audio-vis/shaders/wave.vert

20 lines
399 B
GLSL
Raw Normal View History

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;
uniform vec3 u_lightPos;
2020-08-06 23:44:37 +02:00
uniform vec3 u_baseColor;
uniform vec3 u_maxColor;
2020-08-01 21:51:54 +02:00
out vec4 pos;
out vec3 v_surfaceToLight;
2020-08-06 23:44:37 +02:00
out vec3 maxColor;
out vec3 baseColor;
2020-08-01 21:51:54 +02:00
2020-04-05 15:28:22 +02:00
void main() {
pos = u_matrix * vec4(a_position, 1);
gl_Position = pos;
v_surfaceToLight = u_lightPos - pos.xyz;
2020-08-06 23:44:37 +02:00
maxColor = u_maxColor;
baseColor = u_baseColor;
2020-04-05 15:28:22 +02:00
}