30 lines
616 B
GLSL
30 lines
616 B
GLSL
|
|
#include "header.glsl"
|
|
|
|
layout (location = 0) in vec4 v_pos;
|
|
layout (location = 1) in vec4 v_colour;
|
|
layout (location = 2) in vec2 v_screen_offset;
|
|
layout (location = 3) in vec2 v_uv;
|
|
layout (location = 4) in uint v_texid;
|
|
|
|
out VS_OUT {
|
|
vec4 pos;
|
|
vec4 colour;
|
|
vec2 uv;
|
|
flat uint texid;
|
|
} vout;
|
|
|
|
uniform mat4 u_model = mat4(1);
|
|
uniform mat4 u_view = mat4(1);
|
|
uniform mat4 u_projection = mat4(1);
|
|
|
|
void main() {
|
|
mat4 mat_mv = u_view * u_model;
|
|
vout.pos = mat_mv * v_pos;
|
|
vout.colour = v_colour;
|
|
vout.uv = v_uv;
|
|
vout.texid = v_texid;
|
|
gl_Position = u_projection * (vout.pos + vec4(v_screen_offset, 0, 0));
|
|
}
|
|
|