1
\$\begingroup\$

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.sstatic.net/6XkRo.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.sstatic.net/qz8rR.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.sstatic.net/R9mD0.gif

Here's the code to the TextureSaver script I'm using: https://hatebin.com/wtfyhjcqst

Here's the ShaderGraph: https://i.sstatic.net/gJnbY.png

Any help would be appreciated. I've been stuck on this for weeks!

\$\endgroup\$

0

You must log in to answer this question.

Browse other questions tagged .