LightingModel.js 875 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * The lighting model to use for lighting a {@link ModelExperimental}.
  3. *
  4. * @enum {Number}
  5. *
  6. * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
  7. */
  8. const LightingModel = {
  9. /**
  10. * Use unlit shading, i.e. skip lighting calculations. The model's
  11. * diffuse color (assumed to be linear RGB, not sRGB) is used directly
  12. * when computing <code>gl_FragColor</code>. The alpha mode is still
  13. * applied.
  14. *
  15. * @type {Number}
  16. * @constant
  17. */
  18. UNLIT: 0,
  19. /**
  20. * Use physically-based rendering lighting calculations. This includes
  21. * both PBR metallic roughness and PBR specular glossiness. Image-based
  22. * lighting is also applied when possible.
  23. *
  24. * @type {Number}
  25. * @constant
  26. */
  27. PBR: 1,
  28. };
  29. export default Object.freeze(LightingModel);