NaN in shader - fixed
This commit is contained in:
parent
7db51b12f0
commit
c93cd167bb
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ vec3 computeDirectLight(Surface surface, vec3 L, vec3 light_color)
|
|||
// V Smith GGX height-correlated approximation
|
||||
float GGXV = ndotl * (ndotv * (1.0 - a) + a);
|
||||
float GGXL = ndotv * (ndotl * (1.0 - a) + a);
|
||||
float V = 0.5 / (GGXV + GGXL);
|
||||
float V = 0.5 / max(1e-5, (GGXV + GGXL));
|
||||
|
||||
// F Schlick
|
||||
vec3 F = F_Schlick(hdotv, F0);// mix(F0, vec3(1), pow(1.0 - hdotv, 5.0));
|
||||
|
|
Loading…
Reference in a new issue