67312b79 |
1 | // This file has been automatically generated from resource file src/Shaders/PBRGeometry.glsl |
2 | |
3 | static const char Shaders_PBRGeometry_glsl[] = |
4 | "//! Calculates geometry factor for Cook-Torrance BRDF.\n" |
5 | "float occPBRGeometry (in float theCosV,\n" |
6 | " in float theCosL,\n" |
7 | " in float theRoughness)\n" |
8 | "{\n" |
9 | " float k = theRoughness + 1.0;\n" |
10 | " k *= 0.125 * k;\n" |
11 | " float g1 = 1.0;\n" |
12 | " g1 /= theCosV * (1.0 - k) + k;\n" |
13 | " float g2 = 1.0;\n" |
14 | " g2 /= theCosL * (1.0 - k) + k;\n" |
15 | " return g1 * g2;\n" |
16 | "}\n"; |