Browse Source

move fxaa to end of pipeline to avoid issues with bloom for now

Trevor Baron 7 years ago
parent
commit
ef54caea5f

+ 6 - 7
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts

@@ -413,13 +413,6 @@
             this._prevPostProcess = null;
             this._prevPostProcess = null;
             this._prevPrevPostProcess = null;
             this._prevPrevPostProcess = null;
 
 
-            if (this.fxaaEnabled) {
-                this.fxaa = new FxaaPostProcess("fxaa", 1.0, null, Texture.BILINEAR_SAMPLINGMODE, engine, false, this._defaultPipelineTextureType);
-                this.addEffect(new PostProcessRenderEffect(engine, this.FxaaPostProcessId, () => { return this.fxaa; }, true));
-                this._setAutoClearAndTextureSharing(this.fxaa);
-                
-            }
-
             if (this.sharpenEnabled) {
             if (this.sharpenEnabled) {
                 this.addEffect(this._sharpenEffect);
                 this.addEffect(this._sharpenEffect);
                 this._setAutoClearAndTextureSharing(this.sharpen);
                 this._setAutoClearAndTextureSharing(this.sharpen);
@@ -509,6 +502,12 @@
                 }
                 }
             }
             }
 
 
+            if (this.fxaaEnabled) {
+                this.fxaa = new FxaaPostProcess("fxaa", 1.0, null, Texture.BILINEAR_SAMPLINGMODE, engine, false, this._defaultPipelineTextureType);
+                this.addEffect(new PostProcessRenderEffect(engine, this.FxaaPostProcessId, () => { return this.fxaa; }, true));
+                this._setAutoClearAndTextureSharing(this.fxaa);
+            }
+
             if (this.chromaticAberrationEnabled) {
             if (this.chromaticAberrationEnabled) {
                 this.addEffect(this._chromaticAberrationEffect);
                 this.addEffect(this._chromaticAberrationEffect);
                 this._setAutoClearAndTextureSharing(this.chromaticAberration);
                 this._setAutoClearAndTextureSharing(this.chromaticAberration);