Eevee: Re: Fix NaN

This should be faster and apparently more stable.
This commit is contained in:
Clément Foucault 2017-08-11 01:25:40 +02:00
parent aa575a3152
commit c4201e57f3
1 changed files with 3 additions and 1 deletions

View File

@ -415,7 +415,9 @@ float F_eta(float eta, float cos_theta)
/* Fresnel */
vec3 F_schlick(vec3 f0, float cos_theta)
{
float fac = pow(1.0 - cos_theta, 5);
float fac = 1.0 - cos_theta;
float fac2 = fac * fac;
fac = fac2 * fac2 * fac;
/* Unreal specular matching : if specular color is below 2% intensity,
* (using green channel for intensity) treat as shadowning */