Custom Render Texture not updating when Double Buffered? WHY?

There are two ways to fix this - one is in the update shader - make sure you have ZTest Always in your subshader block. OR (and I think this is something I was doing by accident, in order to make the custom render textures tile) you can disable depth on the custom render texture itself in the Inspector.

This is probably a "well duh" to seasoned shader masters, but I must have spent 3 hours cursing Unity trying to figure out what was wrong.

The other reason your CRT might not be updating is if you've set your initialisation to Realtime, which means it's always initialising!

 

  SubShader
    {
        
        Cull Off
            ZWrite Off
            ZTest Always
        Pass
        {    Name "update RD"
            CGPROGRAM
            #pragma vertex CustomRenderTextureVertexShader
            #pragma fragment frag
            
            
            ENDCG

 

 

 


Comments

Popular posts from this blog

setting VFX graph properties using C#

scripting custom render texture creation, assignment, shaders