m2-ar-projet/shaders/skybox.vert

15 lines
223 B
GLSL

#version 120
attribute vec3 in_pos;
varying vec3 tex_coords;
uniform mat4 proj;
uniform mat4 view;
void main() {
tex_coords = in_pos;
vec4 pos = proj * mat4(mat3(view)) * vec4(in_pos, 1.0);
gl_Position = pos.xyww;
}