Reflect everything in mirror plane except one

I am using mirror plane to reflect objects in the scene. Is there a way to add to a renderList to IGNORE few objects in the scene? That is, I know renderList is used to add objects for which reflection is needed. But is there a function for which we can add an object to a list to ignore it?

For example;

mirrorMaterial.reflectionTexture.renderList = [birdMesh]; //Ignore birdMesh

https://playground.babylonjs.com/#DYDRMG#2

Hello!

you can use the renderlist predicate for that:

mirrorMaterial.reflectionTexture.renderListPredicate = (m) => {
             return m !== birdMesh
         };

https://playground.babylonjs.com/#DYDRMG#5

2 Likes