When SSR is turned off
When SSR is turned on
Why does the scene become dark after turning on SSR? Can you provide some ideas for troubleshooting?
When SSR is turned off
When SSR is turned on
Why does the scene become dark after turning on SSR? Can you provide some ideas for troubleshooting?
We will need a repro somehow, because the error “Active draw buffers with missing fragment shader outputs” is definitely not normal.
I can’t restore this error on PG.
If I use SSAO2 first, then use SSR, an error occurs
Thanks for the repro!
The problem is that when adding the SSR effect, new shaders have to be recompiled because we now have to write in an additional texture (the reflectivity texture) in addition to the normal/depth textures we’re already writing in (because SSAO is enabled).
However, recompiling the shaders can take some time, and while we’re waiting for them to be ready, we continue to use the previous shaders (those compiled when the SSAO effect was the only one enabled).
The problem is that these shaders only write to two textures (normal and depth), whereas the system is now configured for 3 output textures, so we have to write to 3 textures to avoid the warnings you get.
Unfortunately, I can’t see any way of solving the problem on Babylon’s side…
You have three options:
engine.getCaps().parallelShaderCompile = null;
.cc @sebavan in case I would miss something.
As for your second problem, I’m not reproducing it in this PG:
I reverted this error
For this to work, the master meshes of the instances must also be part of the scene. So, you should call assets.addAllToScene()
to make the PG work:
Why some models are visible and some are not?
I don’t really know, but if addAllToScene
is called for all assets as it should be, it does work as expected:
Before and after SSR is turned on, will it affect the number of faces and the number of Draw Calls?
You will only see a large increase in draw calls (depending on your number of meshes) if you use the geometry buffer renderer instead of the prepass renderer.
For eg, for the Back to the future scene:
That’s because the geometry buffer renderer must render the scene a second time. See the last table in this section of the doc:
ok, i got it, tks!