I’m having a weird problem when trying to do a Blit to a renderTexture followed by a Blit to destination:
Void OnRenderImage (RenderTexture source, RenderTexture destination)
{
RenderTexture render1 = new RenderTexture (source.width,
source.height, source.depth);
Graphics.Blit(source, render1, mat1);
mat2.SetTexture("_SecTexture", render1);
Graphics.Blit(source, destination, mat2);
render1=null;
}
This is causing an increase slow down that eventually just crashes unity.
Doing only one of the Blits seems to work normally, but when i do two, i’m having problems.
I searched a lot for an answer and didn’t find it. Help!