Output multiple textures from shader

This is a follow up on a problem I described here where I am using a using a technique described as “Render to Texture/UV” which can be used for texture baking. I need it to create a feedback effect based on world position. More info on this here

This is working okay. But I would now like to make this spreadable using multiple geometries on the same shader. So basically I need to write multiple textures per shader.

As I learned it’s not easily possible to output multiple geometries on a geometry shader I was wondering if the same applies to textures?

My questions in short:

How can I output multiple textures from a shader?
Is using textured3d a solution? Is there an example I could look at? And how can I then turn texture3d into a spread of texture2d for further usage in vvvv?

Thanks a lot!

Texture2DArray is your answer

or Renderer (Texture Spread)

Thanks! Both sound like great ideas but how can I assign every geometry to a separate texture? Seems like everything upstream of the Layer pin is non-spreadable in Renderer (TextureArray) and Renderer
(TextureSpread). The geometries get merged all into all textures whereas I need them separate.

checkout ViewportRouter, ViewportIndex and SelectViewport nodes in DX11, and their help patches ;)

1 Like

just in case
SV_RenderTargetArrayIndex.zip (2.3 KB)

1 Like

@microdee and @antokhio: Wow! That opens up a new world to me. Thank you. :)

@antokhio your patch does exactly what I was looking for.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.