monitor3D.vert 292 B

1234567891011121314151617
  1. uniform mat4 u_mvpMatrix;
  2. uniform mat3 u_normalMatrix;
  3. in vec3 a_position;
  4. in vec3 a_normal;
  5. in vec2 a_texCoord;
  6. out float v_color;
  7. out vec2 v_texCoord;
  8. void main()
  9. {
  10. gl_Position = u_mvpMatrix * vec4(a_position, 1.0);
  11. v_texCoord = a_texCoord;
  12. v_color = (u_normalMatrix * a_normal).z;
  13. }