Keep a RenderTexture or convert it to Texture2D

Hi, I use a render texture to render with a camera. Then I use it on a mesh. I only need 1 frame to render, after I destroy all the objects.

It’s better to keep the render texture or convert it to Texture2D after the camera has rendered it?

Thanks!

A camera renders to a render texture every frame just like it would show on screen, which means that every frame all of the rendering steps have to be done for that texture. If the texture is not going to change any more, there is no need to keep re-rendering the texture - so keep it as a Texture2D instead.

I forgot to mention that I render only frame, I destroy the camera after that.

Destroying the camera will stop it updating the rendertexture but it won’t get rid of the rendertexture. I think also maybe there is a lot more overhead to using a rendertexture later than using a regular texture, because it involves a different part of the api to switch out which buffer is drawn to etc, rather than just choosing a bunch of textures…? … so for performance you might want to grab it off and upload it to a normal texture?

I found an important difference, so I’ll convert it to a normal texture.

“Keep in mind that render texture contents can become “lost” on certain events, like loading a new level, system going to a screensaver mode, in and our of fullscreen and so on. When that happens, your existing render textures will become “not yet created” again, you can check for that with IsCreated function.”