Is there a simple way to clear a render texture to a custom color before rendering to it? Something like this: Code (csharp): void OnPreRender(){ someRenderTexture.color = Color.white; //But something that works :) } void OnRenderImage(){ for(int i=0;i<10;i++){ //Render some kind of accumulative (/frame) effect } } I'm working on an Image Effect that renders multiple passes each frame into a render texture and need to clear it each frame so I don't get a Motion blur effect. The rendertexture is created by a second camera and will then be combined with the rendered image from the main camera to complete the effect. Not sure that makes much sense... Help... /P
create a quad and use a solid color shader that is the size of the camera frustrum, or use the camera clear function setting it to a solid color and set the color you want too. .ORG
Thanks guys Ended up with this - there's two passes in my shader and I use the first one for clearing. Then i draw the second pass multiple times for the effect. Works great /P