Hello Everyone,
I’m trying to create a shader to “paint” on a texture and for this I use:
private void UpdateDrawing(Vector2 position)
{
RenderTexture temp = RenderTexture.GetTemporary(paperRenderTexture.width, paperRenderTexture.height, 24);
Graphics.SetRenderTarget(temp.colorBuffer, paperRenderTexture.depthBuffer);
Graphics.Blit(paperRenderTexture, temp);
Graphics.Blit(temp, paperRenderTexture, paperMat);
RenderTexture.ReleaseTemporary(temp);
}
}
This works perfectly on exe but not for Android (Oculus Quest). I guess this has to do with the depth buffer used by the Blit, but Graphics.SetRenderTarget did not help at all.
The only thing that I did to make it work on the Quest was to add ZTest Always to my shader but this is not the desired behaviour…
Do you have a solution for me?