vertex.glsl 424 B

123456789101112131415161718
  1. attribute float aScale;
  2. uniform float uPixelRatio;
  3. uniform float uTime;
  4. void main()
  5. {
  6. vec4 mvPosition = vec4(position, 1.0);
  7. #ifdef USE_INSTANCING
  8. mvPosition = instanceMatrix * mvPosition;
  9. #endif
  10. vec4 modelPosition = modelMatrix * mvPosition;
  11. vec4 viewPosition = viewMatrix * modelPosition;
  12. vec4 projectionPosition = projectionMatrix * viewPosition;
  13. gl_Position = projectionPosition;
  14. }