Android - Updating Sampler2D at runtime not working

I am trying to send video camera data to my shader at runtime. (Also, tried with just a plain video) Everything works great in the PC version but when I build to android all I get is a grey screen. Here is the code I have in the frag section. Any idea why this is not working on Android? Also did not work on WebGL.

            float4 frag (v2f i) : SV_Target
            {   
                    float4 back    = tex2D(_BufferTexture, i.uv);
                    float4 front = tex2D(_Buffer2Texture, i.uv);
                    float4 change = (front - back);       
                    return change;

In the camera script I have

void Update () {
        if (Cam.didUpdateThisFrame)
        {
            Graphics.CopyTexture(Cam, _Buffer2Texture);
            //I also update the BufferTexture but a frame back
        }

}

I only posted the relevant parts of the code.
Thanks

bump

1 Like

Yup that was the problem… Thanks bgolus.
Is there any other way to do what I am trying without CopyTexture?

Graphics.Blit()?

Yeah I tried that too, I get the same results.
I think it is more or less equivalent to Graphics.CopyTexture.