forked from LeenkxTeam/LNXSDK
Patch_2
This commit is contained in:
@ -36,7 +36,8 @@ float d_ggx(const float nh, const float a) {
|
||||
|
||||
vec3 specularBRDF(const vec3 f0, const float roughness, const float nl, const float nh, const float nv, const float vh) {
|
||||
float a = roughness * roughness;
|
||||
return d_ggx(nh, a) * g2_approx(nl, nv, a) * f_schlick(f0, vh) / max(4.0 * nv, 1e-5); //NdotL cancels out later
|
||||
vec3 result = d_ggx(nh, a) * g2_approx(nl, nv, a) * f_schlick(f0, vh) / max(4.0 * nv, 1e-5); //NdotL cancels out later
|
||||
return min(result, vec3(200.0));
|
||||
}
|
||||
|
||||
// John Hable - Optimizing GGX Shaders
|
||||
|
||||
Reference in New Issue
Block a user