materialInput.js 1.4 KB

123456789101112131415161718192021222324252627282930
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "/**\n\
  3. * Used as input to every material's czm_getMaterial function.\n\
  4. *\n\
  5. * @name czm_materialInput\n\
  6. * @glslStruct\n\
  7. *\n\
  8. * @property {float} s 1D texture coordinates.\n\
  9. * @property {vec2} st 2D texture coordinates.\n\
  10. * @property {vec3} str 3D texture coordinates.\n\
  11. * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n\
  12. * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n\
  13. * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n\
  14. * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n\
  15. * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.\n\
  16. * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.\n\
  17. */\n\
  18. struct czm_materialInput\n\
  19. {\n\
  20. float s;\n\
  21. vec2 st;\n\
  22. vec3 str;\n\
  23. vec3 normalEC;\n\
  24. mat3 tangentToEyeMatrix;\n\
  25. vec3 positionToEyeEC;\n\
  26. float height;\n\
  27. float slope;\n\
  28. float aspect;\n\
  29. };\n\
  30. ";