Files
NxtAR-android/assets/shaders/singleDiffuseLight/singleDiffuseLight_vert.glsl

32 lines
615 B
Plaintext
Raw Normal View History

2014-05-06 16:36:46 -04:30
// Model-view matrix.
uniform mat4 u_projTrans;
// Normal matrix.
uniform mat4 u_normalMat;
2014-05-06 16:36:46 -04:30
// Vertex position in world coordinates.
attribute vec4 a_position;
// Vertex normal.
attribute vec4 a_normal;
2014-05-07 16:42:14 -04:30
// Vertex color.
attribute vec4 a_color;
// Vertex position to pass to the fragment shader.
varying vec4 v_position;
// Vertex normal to pass to the fragment shader.
varying vec3 v_normal;
2014-05-07 16:42:14 -04:30
// Vertex color to pass to the fragment shader.
varying vec4 v_color;
void main(){
v_position = u_projTrans * a_position;
2014-05-07 16:42:14 -04:30
v_color = a_color;
v_normal = vec3(u_normalMat * a_normal);
gl_Position = v_position;
2014-05-06 16:36:46 -04:30
}