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?

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
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

For the reprojection i noticed, that i don't need it, but it will come in handy to render masks etc. for godrays eg. the same time you render the more complicated stuff.

  • Intel® Core™ i7-8550U @ 1.80 Ghz 
  • 16GB RAM 
  • INTEL UHD Graphics 620
  • Windows 10 Pro 64-Bit-Version
Link to comment
Share on other sites

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

×
×
  • Create New...