Output shader to image

Hi all,

Being ignorant on the matter of shaders, I wanted to know if it’s possible to specify a texture, or any other texture-like format as the output for a shader.

I’m using this for a postcard/photo decal system, and CaptureScreenshot and GetPixels aren’t enough for the job.

So I basically wanted to know if there’s any way to ask a shader to output to an image rather than to whatever it usually outputs to<= the screen?

Thanks in advance

You can have a camera render itself to a texture instead of the screen - this is what is known as RenderTextures. Everything passes through the rendering pipeline as normal, and all shaders are executed like you’re used to, the system just writes all the rendered pixels in a texture instead of displaying them on the screen. You can read about it if you follow the link I provided.

Keep in mind that this is unfortunately a Unity Pro feature.