depth.vertex.fx 702 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. precision highp float;
  2. // Attribute
  3. attribute vec3 position;
  4. #include<bonesDeclaration>
  5. // Uniform
  6. #include<instancesDeclaration>
  7. uniform mat4 viewProjection;
  8. #if defined(ALPHATEST) || defined(NEED_UV)
  9. varying vec2 vUV;
  10. uniform mat4 diffuseMatrix;
  11. #ifdef UV1
  12. attribute vec2 uv;
  13. #endif
  14. #ifdef UV2
  15. attribute vec2 uv2;
  16. #endif
  17. #endif
  18. void main(void)
  19. {
  20. #include<instancesVertex>
  21. #include<bonesVertex>
  22. gl_Position = viewProjection * finalWorld * vec4(position, 1.0);
  23. #if defined(ALPHATEST) || defined(BASIC_RENDER)
  24. #ifdef UV1
  25. vUV = vec2(diffuseMatrix * vec4(uv, 1.0, 0.0));
  26. #endif
  27. #ifdef UV2
  28. vUV = vec2(diffuseMatrix * vec4(uv2, 1.0, 0.0));
  29. #endif
  30. #endif
  31. }