Jump to content

PostEffect: multiple colorAttachments not working


klepto2
 Share

Go to solution Solved by Josh,

Recommended Posts

I have the need to write to 2 colorattachments and i have set it up like this:

    "textures":
        [
            {
                "size": [0.5, 0.5],
                "format": 97
            },
            {
                "size": [0.5, 0.5],
                "format": 97
            }
        ],
        "subpasses":
        [
            {    
                "samplers": ["DEPTH", "NORMAL", "PREVPASS"],
                "colorAttachments": [0,1],
                "shader":
                {
                    "float32":
                    {
                        "fragment": "Shaders/Environment/environment_clouds.frag.spv"
                    }
                }
            },

in the shader file i have something like this (very simplfied):

layout(location = 0) out vec4 outColor[2];

void main()
{
	outColor[0] = vec4(1.0,0.0,0.0,1.0);
	outColor[1] = vec4(0.0,1.0,0.0,1.0);
}

only the red value is stored to the texture, the second one is still unmodified. Ate multiple attachemnts currently not supported?

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

  • Solution

I think I remember this being a limitation of the current system but I don’t think it will be very hard to implement 

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...