vulkan-tutorial/shadersrc/mesh.vert

21 lines
398 B
GLSL
Raw Normal View History

2022-12-02 19:34:12 +00:00
#version 450
layout (location = 0) in vec3 vPosition;
layout (location = 1) in vec3 vNormal;
2022-12-03 07:41:13 +00:00
layout (location = 2) in vec4 vColor;
2022-12-02 19:34:12 +00:00
2022-12-03 07:41:13 +00:00
layout (location = 0) out vec4 outColor;
2022-12-02 19:34:12 +00:00
2022-12-11 08:02:17 +00:00
//push constants block
layout( push_constant ) uniform constants
{
vec4 data;
mat4 render_matrix;
} PushConstants;
2022-12-02 19:34:12 +00:00
void main()
{
2022-12-11 08:02:17 +00:00
gl_Position = PushConstants.render_matrix * vec4(vPosition, 1.0f);
2022-12-02 19:34:12 +00:00
outColor = vColor;
}