2020-04-05 15:28:22 +02:00
|
|
|
#version 300 es
|
|
|
|
|
2020-08-01 21:51:54 +02:00
|
|
|
in vec3 a_position;
|
|
|
|
uniform mat4 u_matrix;
|
2020-08-05 11:24:59 +02:00
|
|
|
uniform vec3 u_lightPos;
|
2020-08-01 21:51:54 +02:00
|
|
|
|
2020-08-05 11:24:59 +02:00
|
|
|
out vec4 pos;
|
|
|
|
out vec3 v_surfaceToLight;
|
2020-08-01 21:51:54 +02:00
|
|
|
|
2020-04-05 15:28:22 +02:00
|
|
|
void main() {
|
2020-08-05 11:24:59 +02:00
|
|
|
pos = u_matrix * vec4(a_position, 1);
|
|
|
|
gl_Position = pos;
|
|
|
|
v_surfaceToLight = u_lightPos - pos.xyz;
|
2020-04-05 15:28:22 +02:00
|
|
|
}
|