SkyAtmosphereVS.js 834 B

1234567891011121314151617181920212223242526272829303132
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "in vec4 position;\n\
  3. \n\
  4. out vec3 v_outerPositionWC;\n\
  5. \n\
  6. #ifndef PER_FRAGMENT_ATMOSPHERE\n\
  7. out vec3 v_mieColor;\n\
  8. out vec3 v_rayleighColor;\n\
  9. out float v_opacity;\n\
  10. out float v_translucent;\n\
  11. #endif\n\
  12. \n\
  13. void main(void)\n\
  14. {\n\
  15. vec4 positionWC = czm_model * position;\n\
  16. vec3 lightDirection = getLightDirection(positionWC.xyz);\n\
  17. \n\
  18. #ifndef PER_FRAGMENT_ATMOSPHERE\n\
  19. computeAtmosphereScattering(\n\
  20. positionWC.xyz,\n\
  21. lightDirection,\n\
  22. v_rayleighColor,\n\
  23. v_mieColor,\n\
  24. v_opacity,\n\
  25. v_translucent\n\
  26. );\n\
  27. #endif\n\
  28. \n\
  29. v_outerPositionWC = positionWC.xyz;\n\
  30. gl_Position = czm_modelViewProjection * position;\n\
  31. }\n\
  32. ";