I just want to make the fxaa post process render after something other post process.when i set Fxaa’s camera to null,there is something error,but when i set it to scene.activeCamera, it will render two times.who can help me?
you can see the example here:
https://www.babylonjs-playground.com/#QCGFI6#3
In this case I would recommend setting the camera as the second parameter of the FxaaPostprocess (like in your example). That should work directly.
Unfortunately your example does not repro your issue so I’m not sure what is your problem
I hava set it.But it will always work before other post process.I want it to be the last render after others.so i want to set the second parameter to null.and fxaa._reusable = true; var blackAndWhiteThenBlur = new BABYLON.PostProcessRenderEffect(engine, "blackAndWhiteThenBlur", function () { return [blackAndWhite, horizontalBlur, fxaa] });
to achieve the effect ,but it can’t be set to null,there is some error;and you can push F12 to konw the render order of post processes
Can you repro the actual error in the PG?
ok,you can see example here https://www.babylonjs-playground.com/#QCGFI6#5
If you don’t provide a camera to the constructor, you must pass in the engine, else it will end up to being undefined and will produce the error you see:
var fxaa = new BABYLON.FxaaPostProcess("fxaa", 1, null, undefined, engine);
it works! thank you very much!