Example:
https://playground.babylonjs.com/#WW87YI#10
The GI lighting totally disappears when using any of
SSAO2RenderingPipeline
SSRRenderingPipeline
or
MotionBlurPostProcess
However, it works when using
DefaultRenderingPipeline
Also disappears using my own post effects that are usiing scene.enablePrePassRenderer(), but not when just call this on its own, so maybe nothing to do with prepass.
This is looking like a true master question let me summon @Evgeni_Popov in the thread
GIRSM
doesnât work with the pre-pass renderer, see:
We didnât communicate on this feature yet, because we still need to write a demo and some documentation about it. Also, keep in mind itâs not a full GI solution, as you could find in some games, for eg (more details in the doc to come)!
Regarding your PG:
you must call giRsmManager.addMaterial(); to enable all materials of the scene for GI rendering
you must call rsm.updateLightParameters() to make sure light parameters are calculated (I will make a PR to do it automatically when rsm.addMesh âŚ
The workaround is to force SSAO or SSR to use the geometry buffer instead:
let ssao = new BABYLON.SSAO2RenderingPipeline(
"ssao",
scene,
{
ssaoRatio: 0.5,
blurRatio: 0.5,
},
camera,
true // forceGeometryBuffer
)
1 Like
As @fazil47 said, you must use the geometry buffer renderer with SSAO/SSR if you want to use GI with them.
I updated the doc to make it clear:
BabylonJS:master
â BabylonJS:Popov72-patch-7
opened 07:57AM - 11 Apr 24 UTC
1 Like