Fix: EEVEE-Next: incorrect GGX BRDF LUT coordinates
This commit is contained in:
@@ -308,7 +308,9 @@ vec3 F_brdf_multi_scatter(vec3 f0, vec3 f90, vec2 lut)
|
||||
vec2 brdf_lut(float cos_theta, float roughness)
|
||||
{
|
||||
#ifdef EEVEE_UTILITY_TX
|
||||
return utility_tx_sample_lut(utility_tx, vec2(cos_theta, roughness), UTIL_BSDF_LAYER).rg;
|
||||
/* Parametrizing with `sqrt(1.0 - cos(theta))` for more precision near grazing incidence. */
|
||||
vec2 coords = vec2(roughness, sqrt(1.0 - cos_theta));
|
||||
return utility_tx_sample_lut(utility_tx, coords, UTIL_BSDF_LAYER).rg;
|
||||
#else
|
||||
return vec2(1.0, 0.0);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user