Correct way to modify a Texture2d with a shader?
Background:
I'm working on a basic paint program. Have most of it working well, but Texture2D 'SetPixels' is too slow for > 100px^2 on Android.
So I'm trying to modify the texture2d on the GPU using a shader. It's working on PC- I send the shader points, brush size, the texture, and if the point is in the right area in the fragment shader, I set the color to the brush color.
But it doesn't work on Android because it doesn't appear to support 'Graphics.CopyTexture', to copy the render texture back to the texture2d.
Question:
What is the correct way to modify a texture2D using a shader, then apply those changes back to the original texture?
I'm using
Graphics.Blit(MyTexture2D, RenderTexture, BrushDrawingMaterial);
But that only modifies the render texture, which I need to apply back onto the texture2d (which works on PC, but not on android without 'Graphics.CopyTexture').
Your answer
Follow this Question
Related Questions
purple(pink) screen on android 0 Answers
GPU Instancing works strangely on android 0 Answers
Shader graph is cutting off the top row of pixels from texture2D 1 Answer
shader graph messes up the texture (2D) 0 Answers
Texture offset not working with shader 0 Answers