- Home /
Question by
fox3fire · Jul 14, 2018 at 08:16 AM ·
camerarendertextureinstancingrendertotexturetargettexture
How to specify a depthSlice of Camera's targetTexture?
I am using a RenderTexture as a Tex2DArray. To render to an element in that array, you need to use SetRenderTarget to specify your desired element's index as the parameter depthSlice. But to render using a camera, you can only set the targetTexture of it. How do I specify which element I want to render into, when using a camera's targetTextrue as a Tex2DArray? (FYI, the reason why I am obsessed with camera is that I also want to use GPU instancing, which can only be achieved with a camera.)
Comment
Best Answer
Answer by fox3fire · Jul 14, 2018 at 08:54 AM
Good news! It seems the Command Buffer's verision of DrawMeshInstanced does not require a camera and with Graphics.ExcuteCommandBuffer, this method looks promising.