opengl_vertex.glsl 285 B

1234567891011121314151617
  1. uniform lowp vec4 materialColor;
  2. varying lowp vec4 varColor;
  3. varying highp vec3 eyeVec;
  4. void main(void)
  5. {
  6. gl_Position = mWorldViewProj * inVertexPosition;
  7. vec4 color = inVertexColor;
  8. color *= materialColor;
  9. varColor = color;
  10. eyeVec = -(mWorldView * inVertexPosition).xyz;
  11. }