pbrBlockReflectance.js 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Do not edit.
  2. import { ShaderStore } from "../../Engines/shaderStore.js";
  3. const name = "pbrBlockReflectance";
  4. const shader = `#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)
  5. vec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,environmentBrdf);
  6. #ifdef RADIANCEOCCLUSION
  7. specularEnvironmentReflectance*=seo;
  8. #endif
  9. #ifdef HORIZONOCCLUSION
  10. #ifdef BUMP
  11. #ifdef REFLECTIONMAP_3D
  12. specularEnvironmentReflectance*=eho;
  13. #endif
  14. #endif
  15. #endif
  16. #else
  17. vec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface));
  18. #endif
  19. #ifdef CLEARCOAT
  20. specularEnvironmentReflectance*=clearcoatOut.conservationFactor;
  21. #if defined(CLEARCOAT_TINT)
  22. specularEnvironmentReflectance*=clearcoatOut.absorption;
  23. #endif
  24. #endif
  25. `;
  26. // Sideeffect
  27. ShaderStore.IncludesShadersStore[name] = shader;
  28. /** @internal */
  29. export const pbrBlockReflectance = { name, shader };
  30. //# sourceMappingURL=pbrBlockReflectance.js.map