mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-01 17:36:21 +03:00
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.
14 lines
354 B
GLSL
14 lines
354 B
GLSL
//! Calculates geometry factor for Cook-Torrance BRDF.
|
|
float occPBRGeometry (in float theCosV,
|
|
in float theCosL,
|
|
in float theRoughness)
|
|
{
|
|
float k = theRoughness + 1.0;
|
|
k *= 0.125 * k;
|
|
float g1 = 1.0;
|
|
g1 /= theCosV * (1.0 - k) + k;
|
|
float g2 = 1.0;
|
|
g2 /= theCosL * (1.0 - k) + k;
|
|
return g1 * g2;
|
|
}
|