Maximum value for fxaa and inspector

Hi. Is there a maximum value for fxaa samples or something recomanded?
I’m asking because I created this simple pg.
https://playground.babylonjs.com/#U5SSCN#26
If I want to click on debug tab of inspector, everything become white without any errors :))

And one more question. I saw that the sounds doesn’t appear in the inspector, any plans to add?
btw:This is less important, I’m playing with the sounds twice in one year, so :))

Definitely a bug, looking with Spector it looks like FXAA is running twice after clicking on debug which does not make any sense :slight_smile:

I will look into it ASAP.

But on a side note, using samples on FXAA is useless :slight_smile: basically samples is usefull only if you render geometry before. FXAA is on its own an AA technique (in full screen) where MSAA will work at the “geometry level” if we can say it this way.

It should not even work in the first place.

I ll try to prevent it to do anything. Else, only use the samples parameter from the pipeline this will do everything you want. Its max depends heavily on the hardware you are running on: define in GL by gl.getParameter(gl.MAX_SAMPLES) and we clamp the input value to this number for you.

1 Like

found why it works the first time cause the texture have not been created so far so the max is clamped to one but when refreshing the pipeline by clicking on Debug it applies the value make it expectedly crash

I gues… :slight_smile:

Also the explanation above is mainly true in pipeline mode. I could see a mixed use outside of it.

1 Like

But thanks to you it is highlighting an issue when the set value is above the max that I will fix ASAP :slight_smile:

This is also the main reason of the crash… as too many textures are created per frame, so one stone two birds, You ll have it in a couple of hours.

1 Like

All fixed by Fix MSAA Samples overflow on post process. by sebavan · Pull Request #6648 · BabylonJS/Babylon.js · GitHub

It will be in the next nightly, and I added the max value to the capabilities so that you can check it if needed :slight_smile:

Hey @sebavan. Thanks for fix and explanations.
But now is not too clear if what I did was good or not :slight_smile:
I have to call this pp, after I load all the meshes in the scene?
And is enough to enable fxaa, without set its samples? It affect the scene somehow if I’m using both fxaa and msaa?
In my scene I saw that if I’m using only MSAA, is pretty good, same for only FXAA, but with both, like in the pg it looks great.
I’ll try to create a new pg, with a different 3d model where this postprocess is more visible.

Maybe this; https://playground.babylonjs.com/#U5SSCN#28
But in pg seems we are not haveing issues with AA

You can call the pp when you want. It is only usefull if the input is not another pp and directly the scene geometry.

Using both can be great but usually enabling antialiasing on the engine (2nd parameter of the constructor) is enough ?

Oki, understood.
Yes. Most of the time, is enough. Thanks