Hi.
In my scene there are many objects. I make a mirror from Render Texture. It’s possible to make it reflect the terrain only ?
Use a layer.
Give the terrain its own layer, then set the reflection camera to only see the terrain layer by setting its culling mask.
Good. One more question.
Does this method of reflection cost more frame rate ? Will this effect the game speed ?
Does using layers and a culling mask make a camera render slower? No. It’ll be faster to render only the terrain vs rendering everything in the reflection.
How much faster? Depends on a lot of factors (like how much other stuff is in your scene, and where your bottlenecks are for performance). Potentially a lot, also potentially you’ll see almost no difference in frame rate.
Thank you so much Bgolus.
Ben, or someone else, what can i do to change on the fly what to render (via a camera into a render target).
-
can i reasonably assume setting layer masks n times every frame (from their normal masks, to some special mask i need for this 1 camera, then back to their previous masks again) is fast?
-
any other way how to tell (via a command buffer, perhaps?) which objects to render on a camera?
-
AFAIU the amount of layer masks is limited ?
-
and there are special rules for how many can be disabled on deffered rendering?
thanks for any help or pointers to documentation / articles / examples