Clipping and Mirror texture

Hello there. I’ve run into a bug (I think it’s a bug)

Enabling a MirrorTexture disables the scene clipping.
I’ve made a simple “Random” playground that does or does not enables the mirrors.

Any ideas on how to have clipping AND mirrors working together ?


Only the first clipPlane seems to be affected. clipPlane2 3 4 5 6 all work. Maybe one of the devs can shed some light on why this is?

Indeed, I did not see this.

Thank you for this additionnal information

My guess is that they use the “clipPlane” during the mirror rendering pass and replace it by the mirror plane, and then instead of restoring the original value, they simply clear it.
If i’m right, it’s a pretty simple fix.

@Estraven you’re right! Here’s the fix:

Fix clip plane not reset to the right value when using mirrors by Popov72 · Pull Request #9571 · BabylonJS/Babylon.js · GitHub

1 Like