Reputation: 115
I've been experimenting with BabylonJS, and I want to make a visual effect that requires rendering parts of the scene in an external render target texture, but not in the main scene itself. Basically, I want to make the object invisible in the main scene, but visible in the render target.
See the Playground link here: https://playground.babylonjs.com/#PL5WU0
Currently, the sphere is drawn above the textured ground plane. How do I change it so the sphere is invisible, and can only be seen in the RT texture?
Upvotes: 1
Views: 1463
Reputation: 1767
you can play with the layerMasks to hide the mesh from the main camera: https://playground.babylonjs.com/#PL5WU0#1
Upvotes: 3