m2-ar-projet/shaders/main.vert

19 lines
336 B
GLSL
Raw Normal View History

2021-01-02 17:45:42 +01:00
attribute vec3 in_pos;
attribute vec3 in_norm;
attribute vec2 in_uv;
2020-12-28 17:36:45 +01:00
2021-01-02 17:45:42 +01:00
varying vec3 norm;
varying vec2 uv;
varying vec3 frag_pos;
2020-12-28 17:36:45 +01:00
uniform mat4 proj;
uniform mat4 view;
uniform mat4 model;
void main() {
gl_Position = proj * view * model * vec4(in_pos, 1.0);
norm = in_norm;
uv = in_uv;
frag_pos = vec3(model * vec4(in_pos, 1.0));
}