babylon.fxaaPostProcess.js 1.1 KB

1234567891011121314151617181920212223242526
  1. var __extends = 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. __.prototype = b.prototype;
  5. d.prototype = new __();
  6. };
  7. var BABYLON;
  8. (function (BABYLON) {
  9. var FxaaPostProcess = (function (_super) {
  10. __extends(FxaaPostProcess, _super);
  11. function FxaaPostProcess(name, ratio, camera, samplingMode, engine, reusable) {
  12. var _this = this;
  13. _super.call(this, name, "fxaa", ["texelSize"], null, ratio, camera, samplingMode, engine, reusable);
  14. this.onSizeChanged = function () {
  15. _this.texelWidth = 1.0 / _this.width;
  16. _this.texelHeight = 1.0 / _this.height;
  17. };
  18. this.onApply = function (effect) {
  19. effect.setFloat2("texelSize", _this.texelWidth, _this.texelHeight);
  20. };
  21. }
  22. return FxaaPostProcess;
  23. })(BABYLON.PostProcess);
  24. BABYLON.FxaaPostProcess = FxaaPostProcess;
  25. })(BABYLON || (BABYLON = {}));
  26. //# sourceMappingURL=babylon.fxaaPostProcess.js.map