0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
[occt.git] / src / Shaders / PBRDistribution.glsl
CommitLineData
67312b79 1//! Calculates micro facet normals distribution.
2float occPBRDistribution (in float theCosH,
3 in float theRoughness)
4{
5 float aDistribution = theRoughness * theRoughness;
6 aDistribution = aDistribution / (theCosH * theCosH * (aDistribution * aDistribution - 1.0) + 1.0);
7 aDistribution = INV_PI * aDistribution * aDistribution;
8 return aDistribution;
9}