babylon.convolutionPostProcess.js 581 B

123456789101112131415161718
  1. "use strict";
  2. var BABYLON = BABYLON || {};
  3. (function () {
  4. BABYLON.ConvolutionPostProcess = function (name, kernelMatrix, ratio, camera, samplingMode) {
  5. BABYLON.PostProcess.call(this, name, "convolution", ["kernelMatrix"], null, ratio, camera, samplingMode);
  6. this.kernelMatrix = kernelMatrix;
  7. var that = this;
  8. this.onApply = function (effect) {
  9. effect.setMatrix("kernelMatrix", that.kernelMatrix);
  10. };
  11. };
  12. BABYLON.ConvolutionPostProcess.prototype = Object.create(BABYLON.PostProcess.prototype);
  13. })();