vulkan_renderer/shaders/vertex.vert

23 lines
425 B
GLSL
Raw Permalink Normal View History

2025-04-18 06:18:45 +02:00
#version 450
// x -> -1 (left) 1(right)
// y -> -1 (top) 1(bottom)
2025-06-10 14:45:47 +02:00
layout( push_constant ) uniform push{
2025-05-30 05:47:09 +02:00
mat4 transform;
2025-06-10 14:45:47 +02:00
}trans;
layout(binding = 0) uniform un{
mat4 view;
} view;
2025-05-30 05:47:09 +02:00
layout(location = 0) in vec2 in_position;
layout(location = 1) in vec3 in_color;
2025-04-18 06:18:45 +02:00
layout(location = 0) out vec3 frag_color;
2025-04-18 06:18:45 +02:00
void main()
{
2025-05-30 05:47:09 +02:00
gl_Position = trans.transform * vec4(in_position, 0.0, 1.0);
frag_color = in_color;
2025-04-18 06:18:45 +02:00
}