pawengine/Shaders/shader.vert

21 lines
469 B
GLSL
Raw Normal View History

2025-02-09 18:48:25 +01:00
#version 450
layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec3 inColor;
2025-02-16 19:42:55 +01:00
layout(location = 2) in mat3 offset;
2025-02-09 18:48:25 +01:00
layout(set = 0, binding = 0) uniform UBO {
mat3 model;
mat3 view;
mat3 proj;
} ubo;
layout(location = 0) out vec3 fragColor;
layout(location = 1) out vec2 fragUV;
void main() {
2025-02-16 19:42:55 +01:00
gl_Position = vec4(ubo.proj * ubo.view * offset * ubo.model * vec3(inPosition, 1.0), 1.0);
2025-02-09 18:48:25 +01:00
fragColor = inColor;
fragUV = inPosition;
}