Skip to content
Snippets Groups Projects
Commit 03c441fa authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#87] Fix shader validation layer warning

parent 074ee4e5
No related branches found
No related tags found
1 merge request!74Resolve "Mesh Shader Implementation"
Pipeline #26214 passed
#version 450
#extension GL_ARB_separate_shader_objects : enable
//layout(location = 0) in vec3 fragColor;
layout(location = 0) in vec3 VertexColor;
layout(location = 0) out vec4 outColor;
struct VertColor
{
vec3 color;
};
layout(location = 0) in VertColor VertexInput;
void main() {
outColor = vec4(VertexInput.color, 1);
outColor = vec4(VertexColor, 1);
}
\ No newline at end of file
......@@ -11,19 +11,7 @@ layout( push_constant ) uniform constants{
mat4 mvp;
};
// out uint gl_PrimitiveCountNV;
// out uint gl_PrimitiveIndicesNV[];
//out gl_MeshPerVertexNV {
// vec4 gl_Position;
//} gl_MeshVerticesNV[];
struct VertColor
{
vec3 color;
};
layout(location = 0) out VertColor VertexOutputs[];
layout(location = 0) out vec3 vertexColors[];
void main() {
if(gl_LocalInvocationID.x == 0)
......@@ -37,8 +25,8 @@ void main() {
gl_MeshVerticesNV[1].gl_Position = mvp * vec4( 0.5, 0.5, 0.5, 1);
gl_MeshVerticesNV[2].gl_Position = mvp * vec4( 0 , -0.5, 0.5, 1);
VertexOutputs[0].color = vec3(1, 0, 0);
VertexOutputs[1].color = vec3(0, 1, 0);
VertexOutputs[2].color = vec3(0, 0, 1);
vertexColors[0] = vec3(1, 0, 0);
vertexColors[1] = vec3(0, 1, 0);
vertexColors[2] = vec3(0, 0, 1);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment