- Home /
Is it possible to render to a texture via RWTexture2D without using Graphics.blit
I would like to save the output of a fragment shader to a texture, so that I can attempt to reuse the data in later shaders. I originally used Graphics.Blit, but the problem I found is that it submits a quad to the shader, and I need to render a mesh.
My current fallback is to use a RWStructuredBuffer to store the colour value. Unfortunately, I have to do this at a per-vertex basis, as I wouldn't know how many fragments there will be. Therefore, if I wanted to reuse the shaded data, it would have lost some accuracy.
So, I would like to know if there is a way to define a rendertexture as the shader target, without using Graphics.blit.
This is my current shader.
And this is the code initialising and assigning the buffers.
buffer-shader.png
(67.8 kB)
shadedbuffer-setup.png
(14.2 kB)
Comment