Hello.
I’m struggling with the use of a mirror texture in a Custom Shader.
I managed to get it to work but only if the MirrorTexture is also associated with a babylon object with a standard BackgroundMaterial (I found an example somewhere that worked)
Basically my current state is :
Object A - Custom shader that uses the mirror with “.setTexture”
Object B - BackgroundMaterial that uses the mirror with "BackgroundMaterial.reflectionTexture = mirror; "
The problem is : The mirror texture only gets updated if the Object B exists AND is in the view.
Is there any way to control when and if the mirror texture must be updated without using “Object B”.
i think it could be easier with a real example in the PG but you should be able to just move the mirror texture into the scene.customRenderTargets array to make it work
I know. Unfortunalty, I can’t share the full project. It would be one hell of a Playground code !
I’m trying to figure out where and why this error occurs.
I’ll post my progress here. Maybe it will help someone else someday.