modelMaterial.glsl 1.5 KB

1234567891011121314151617181920212223242526
  1. /**
  2. * Struct for representing a material for a {@link ModelExperimental}. The model
  3. * rendering pipeline will pass this struct between material, custom shaders,
  4. * and lighting stages. This is not to be confused with {@link czm_material}
  5. * which is used by the older Fabric materials system, although they are similar
  6. *
  7. * @name czm_modelMaterial
  8. * @glslStruct
  9. *
  10. * @property {vec3} diffuse Incoming light that scatters evenly in all directions.
  11. * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
  12. * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
  13. * @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.
  14. * @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.
  15. * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
  16. * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
  17. */
  18. struct czm_modelMaterial {
  19. vec3 diffuse;
  20. float alpha;
  21. vec3 specular;
  22. float roughness;
  23. vec3 normalEC;
  24. float occlusion;
  25. vec3 emissive;
  26. };