18 lines
374 B
GLSL
18 lines
374 B
GLSL
#version 120
|
|
// 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;
|
|
|
|
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);
|
|
}
|