RtB/data/shaders/100/gui_vs.glsl

20 lines
424 B
GLSL

#version 100
// shared data
// our projection and translation matrices
uniform mat4 proj_matrix, mv_matrix;
// attributes
attribute vec3 vp;
attribute vec2 uv;
attribute vec3 normal;
// out
varying vec2 frag_uv;
varying vec3 frag_normal;
void main() {
vec4 eye = mv_matrix * vec4(vp, 1.0);
gl_Position = proj_matrix * eye;
// 1.0 - uv.t = flipped texture
frag_uv = vec2(uv.s, 1.0 - uv.t);
frag_normal = normal;
}