AllMaterialAppearanceVS.glsl 804 B

1234567891011121314151617181920212223242526
  1. attribute vec3 position3DHigh;
  2. attribute vec3 position3DLow;
  3. attribute vec3 normal;
  4. attribute vec3 tangent;
  5. attribute vec3 bitangent;
  6. attribute vec2 st;
  7. attribute float batchId;
  8. varying vec3 v_positionEC;
  9. varying vec3 v_normalEC;
  10. varying vec3 v_tangentEC;
  11. varying vec3 v_bitangentEC;
  12. varying vec2 v_st;
  13. void main()
  14. {
  15. vec4 p = czm_computePosition();
  16. v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
  17. v_normalEC = czm_normal * normal; // normal in eye coordinates
  18. v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
  19. v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
  20. v_st = st;
  21. gl_Position = czm_modelViewProjectionRelativeToEye * p;
  22. }