Render texture ghosting on rotation

I set up a render texture for model that I intend to rotate randomly in front of the camera. When it moves, the rendertexture does update and show the object at the new location but also at its old location! The old one never disappears and a ghosting effect happens. My code simply updates the the model position and rotation on update. Has anyone ran into this issue before?


I should mention, I am drawing the texture in the GUI layer, rather than the texture on an object.

I think it has to do with your clear flags Unity - Scripting API: CameraClearFlags.Depth

Depth only leaves what was last drawn there.

If you clear flags are set to DepthOnly then that would explain your ghosting. You need to clear to Skybox, or SolidColor in order to clear out what was there before. You’re basically drawing over top the image each time currently.

The documentation: Unity - Scripting API: CameraClearFlags