AllMaterialAppearanceVS.glsl 781 B

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