material.glsl 1007 B

12345678910111213141516171819202122
  1. /**
  2. * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
  3. *
  4. * @name czm_material
  5. * @glslStruct
  6. *
  7. * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
  8. * @property {float} specular Intensity of incoming light reflecting in a single direction.
  9. * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
  10. * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
  11. * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
  12. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
  13. */
  14. struct czm_material
  15. {
  16. vec3 diffuse;
  17. float specular;
  18. float shininess;
  19. vec3 normal;
  20. vec3 emission;
  21. float alpha;
  22. };