pbrBlockReflectance.fx 979 B

1234567891011121314151617181920212223242526
  1. #if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX)
  2. vec3 specularEnvironmentReflectance = getReflectanceFromBRDFLookup(clearcoatOut.specularEnvironmentR0, specularEnvironmentR90, environmentBrdf);
  3. #ifdef RADIANCEOCCLUSION
  4. specularEnvironmentReflectance *= seo;
  5. #endif
  6. #ifdef HORIZONOCCLUSION
  7. #ifdef BUMP
  8. #ifdef REFLECTIONMAP_3D
  9. specularEnvironmentReflectance *= eho;
  10. #endif
  11. #endif
  12. #endif
  13. #else
  14. // Jones implementation of a well balanced fast analytical solution.
  15. vec3 specularEnvironmentReflectance = getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV, clearcoatOut.specularEnvironmentR0, specularEnvironmentR90, sqrt(microSurface));
  16. #endif
  17. #ifdef CLEARCOAT
  18. specularEnvironmentReflectance *= clearcoatOut.conservationFactor;
  19. #if defined(CLEARCOAT_TINT)
  20. specularEnvironmentReflectance *= clearcoatOut.absorption;
  21. #endif
  22. #endif