Hello, not sure if this should be reported here or upstream, but starting here as this is the package I'm using (thanks btw!)
I've tested a project locally that seem to have issues when the shaders use multiple shader attachments (i.e. more than one attachment is linked in the shader), but only if the shader is written like:
out vec4 color;
out vec4 normal;
In this case, and for some reason, the Mesa driver inverts the outputs (I tried different backends and it happens with all of them IIRC), so the shader writes the normals to the color attachment, and vice versa.
If I change the shader to look like:
layout(location = 0, index = 0) out vec4 color;
layout(location = 1, index = 0) out vec4 normal;
the problem goes away, so it seems Mesa is assigning the wrong location to the attachments for some reason.
I unfortunately cannot share the project, but hopefully this is enough for a resolution.
Hello, not sure if this should be reported here or upstream, but starting here as this is the package I'm using (thanks btw!)
I've tested a project locally that seem to have issues when the shaders use multiple shader attachments (i.e. more than one attachment is linked in the shader), but only if the shader is written like:
In this case, and for some reason, the Mesa driver inverts the outputs (I tried different backends and it happens with all of them IIRC), so the shader writes the normals to the color attachment, and vice versa.
If I change the shader to look like:
the problem goes away, so it seems Mesa is assigning the wrong location to the attachments for some reason.
I unfortunately cannot share the project, but hopefully this is enough for a resolution.