#version 460 // Transforms model vertices by the MVP push constant. The model-space position // is passed through so the fragment shader can derive a flat normal from it. layout(location = 0) in vec3 inPos; layout(push_constant) uniform PC { mat4 mvp; vec4 color; // .rgb base colour, .a = lit flag (1 = shaded, 0 = flat) } pc; layout(location = 0) out vec3 vModelPos; void main() { vModelPos = inPos; gl_Position = pc.mvp * vec4(inPos, 1.0); }