Files
rust-engine/shaders/text.vert
2021-10-26 17:28:29 +02:00

29 lines
650 B
GLSL

#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(binding = 0, set = 0) uniform ObjectUniformData {
mat4 view;
mat4 projection;
mat4 ortho_projection;
float time;
vec3 light_position;
vec3 light_directional_rotation;
vec3 camera_position;
} ubo;
layout(location = 0) in vec3 position;
layout(location = 1) in vec2 uv;
layout(location = 0) out vec2 tex_coords;
out gl_PerVertex {
vec4 gl_Position;
};
void main() {
// Vertex position in camera
gl_Position = ubo.ortho_projection * vec4(position, 1.0);
// Just interpolate UV coords, no transformation needed
tex_coords = uv;
}