XYZToRGB.js 383 B

12345678910111213
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "vec3 czm_XYZToRGB(vec3 Yxy)\n\
  3. {\n\
  4. const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n\
  5. -1.5371, 1.8760, -0.2040,\n\
  6. -0.4985, 0.0416, 1.0572);\n\
  7. vec3 xyz;\n\
  8. xyz.r = Yxy.r * Yxy.g / Yxy.b;\n\
  9. xyz.g = Yxy.r;\n\
  10. xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n\
  11. return XYZ2RGB * xyz;\n\
  12. }\n\
  13. ";