babylon.stereoscopicInterlacePostProcess.js 1.4 KB

123456789101112131415161718192021222324252627
  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. __.prototype = b.prototype;
  5. d.prototype = new __();
  6. };
  7. var BABYLON;
  8. (function (BABYLON) {
  9. var StereoscopicInterlacePostProcess = (function (_super) {
  10. __extends(StereoscopicInterlacePostProcess, _super);
  11. function StereoscopicInterlacePostProcess(name, camB, postProcessA, isStereoscopicHoriz, samplingMode) {
  12. var _this = this;
  13. _super.call(this, name, "stereoscopicInterlace", ['stepSize'], ['camASampler'], 1, camB, samplingMode, camB.getScene().getEngine(), false, isStereoscopicHoriz ? "#define IS_STEREOSCOPIC_HORIZ 1" : undefined);
  14. this._stepSize = new BABYLON.Vector2(1 / this.width, 1 / this.height);
  15. this.onSizeChanged = function () {
  16. _this._stepSize = new BABYLON.Vector2(1 / _this.width, 1 / _this.height);
  17. };
  18. this.onApply = function (effect) {
  19. effect.setTextureFromPostProcess("camASampler", postProcessA);
  20. effect.setFloat2("stepSize", _this._stepSize.x, _this._stepSize.y);
  21. };
  22. }
  23. return StereoscopicInterlacePostProcess;
  24. })(BABYLON.PostProcess);
  25. BABYLON.StereoscopicInterlacePostProcess = StereoscopicInterlacePostProcess;
  26. })(BABYLON || (BABYLON = {}));
  27. //# sourceMappingURL=babylon.stereoscopicInterlacePostProcess.js.map