- Home /
I have a problem with updating a RenderTexture being used in combination with a shader.
I just can't seem to figure out why I can't save the image I've drawn onto an orthographic RenderTexture.
Here's how my scene works: https://i.imgur.com/jAWO2V8.gif
Basically, it's a painting effect using a ParticleSystem that draws a trail based on where I click and hold my mouse. As soon as I let go of my mouse, it saves the current RenderTexture into a cached Texture2D reference which is clearly shown here: https://i.imgur.com/rDMJ3Xa.png
The problem here is that the main RenderTexture (BrushRT) is not taking the saved Texture2D data and keeping it. The intended effect is to have the RenderTexture save everything I've drawn so far. It doesn't do so and the ParticleSystem just disappears as shown here: https://i.imgur.com/ucNs3tV.gif
Here's the code to the TextureSaver script I'm using: https://hatebin.com/wtfyhjcqst
Here's the ShaderGraph: https://i.imgur.com/cIAXEKb.png
Any help would be appreciated. I've been stuck on this for weeks!
Your answer
Follow this Question
Related Questions
Blit isn't writing to render texture 1 Answer
Multiple Blit problem 2 Answers
Blit shader to RenderTexture results in solid black 0 Answers
Prevent Render Texture clearing 1 Answer