Hi!
If you move camera, bad z-fighting will occur in the skymaterial:
https://playground.babylonjs.com/#7D2QDD#30
With 4.2.0 this bug won’t occur, it can be verified in that playground.
Hi!
If you move camera, bad z-fighting will occur in the skymaterial:
https://playground.babylonjs.com/#7D2QDD#30
With 4.2.0 this bug won’t occur, it can be verified in that playground.
adding @julien-moreau and @CraigFeldspar
@CraigFeldspar it looks like the normal RTT of the sky is not correct, do you confirm?
The blue face should be green no?
@julien-moreau yep totally. Is the determinant of the world matrix somehow negative ?
Actually no, the normal information is totally correct since the skybox is oriented outwards. If you set backfaceCulling to false, mesh doesn’t render at all.
Z-fighting is a side effect to the fact that indeed we try to render SSAO on a very far mesh wrongly oriented. SSAO2 should actually render it totally black.
@JSa In your case you should not have SSAO2 render on your skybox. Please use skyMaterial.disableDepthWrite = true;
to disregard SSAO on the material. Z-fighting should disappear
Great solution, thanks!