modelMaterial.js 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "/**\n\
  3. * Struct for representing a material for a {@link Model}. The model\n\
  4. * rendering pipeline will pass this struct between material, custom shaders,\n\
  5. * and lighting stages. This is not to be confused with {@link czm_material}\n\
  6. * which is used by the older Fabric materials system, although they are similar.\n\
  7. * <p>\n\
  8. * All color values (diffuse, specular, emissive) are in linear color space.\n\
  9. * </p>\n\
  10. *\n\
  11. * @name czm_modelMaterial\n\
  12. * @glslStruct\n\
  13. *\n\
  14. * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n\
  15. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n\
  16. * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.\n\
  17. * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.\n\
  18. * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n\
  19. * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.\n\
  20. * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n\
  21. */\n\
  22. struct czm_modelMaterial {\n\
  23. vec3 diffuse;\n\
  24. float alpha;\n\
  25. vec3 specular;\n\
  26. float roughness;\n\
  27. vec3 normalEC;\n\
  28. float occlusion;\n\
  29. vec3 emissive;\n\
  30. };\n\
  31. ";