1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00
occt/resources/Shaders/PBRDistribution.glsl
Pasukhin Dmitry df4b931988
Configuration - Resource structure reorganization #429
Reorganized resources to keep source part in src and real-time scripts in resource folder.
For the installation result no changes, still installed to src for windows.
2025-03-18 22:54:43 +00:00

10 lines
382 B
GLSL

//! Calculates micro facet normals distribution.
float occPBRDistribution (in float theCosH,
in float theRoughness)
{
float aDistribution = theRoughness * theRoughness;
aDistribution = aDistribution / (theCosH * theCosH * (aDistribution * aDistribution - 1.0) + 1.0);
aDistribution = INV_PI * aDistribution * aDistribution;
return aDistribution;
}