babylon.fxaaPostProcess.js 1.1 KB

12345678910111213141516171819202122232425
  1. var __extends = (this && this.__extends) || function (d, b) {
  2. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  3. function __() { this.constructor = d; }
  4. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  5. };
  6. var BABYLON;
  7. (function (BABYLON) {
  8. var FxaaPostProcess = (function (_super) {
  9. __extends(FxaaPostProcess, _super);
  10. function FxaaPostProcess(name, ratio, camera, samplingMode, engine, reusable) {
  11. var _this = this;
  12. _super.call(this, name, "fxaa", ["texelSize"], null, ratio, camera, samplingMode, engine, reusable);
  13. this.onSizeChanged = function () {
  14. _this.texelWidth = 1.0 / _this.width;
  15. _this.texelHeight = 1.0 / _this.height;
  16. };
  17. this.onApply = function (effect) {
  18. effect.setFloat2("texelSize", _this.texelWidth, _this.texelHeight);
  19. };
  20. }
  21. return FxaaPostProcess;
  22. })(BABYLON.PostProcess);
  23. BABYLON.FxaaPostProcess = FxaaPostProcess;
  24. })(BABYLON || (BABYLON = {}));
  25. //# sourceMappingURL=babylon.fxaaPostProcess.js.map