If cam is the Camera component of a camera GameObject and rt is a RenderTexture created with:
RenderTexture rt = RenderTexture.GetTemporary(width, height, 24, RenderTextureFormat.ARGB32);
Then, are these three lines all exactly equivalent?
cam.targetTexture = rt;
cam.SetTargetBuffers(rt.colorBuffer, rt.depthBuffer);
cam.SetTargetBuffers(new RenderBuffer[] { rt.colorBuffer }, rt.depthBuffer);
If not, what is the difference?
My code works fine, but when I try to to change the first of these to use SetTargetBuffers my code stops working.
I’m just refactoring code that will shortly be needing MRT (multiple render targets) and I thought I’d test that it still works with one color buffer.
Any suggestions as to why this would be?
Thanks
Jules