NormalShader.vert 496 B

123456789101112131415161718
  1. varying vec3 normal;
  2. varying vec3 tangent;
  3. varying vec3 binormal;
  4. varying vec4 pos;
  5. varying vec4 rawpos;
  6. varying vec4 vertexColor;
  7. attribute vec3 vTangent;
  8. void main() {
  9. normal = normalize(gl_NormalMatrix * gl_Normal);
  10. tangent = normalize(gl_NormalMatrix * vTangent);
  11. binormal = normalize(cross(normal, tangent));
  12. gl_Position = ftransform();
  13. pos = gl_ModelViewMatrix * gl_Vertex;
  14. rawpos = gl_Vertex;
  15. vertexColor = gl_Color;
  16. gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
  17. }