@@ -120,7 +120,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, float A, vec3 light_color, bool is_di
120
120
#endif
121
121
122
122
// We skip checking on attenuation on directional lights to avoid a branch that is not as beneficial for directional lights as the other ones.
123
- const float EPSILON = 1e- 3f ;
123
+ const float EPSILON = 1e- 6f ;
124
124
if (is_directional || attenuation > EPSILON) {
125
125
float cNdotL = max (NdotL, 0.0 );
126
126
#if defined(DIFFUSE_BURLEY) || defined(SPECULAR_SCHLICK_GGX) || defined(LIGHT_CLEARCOAT_USED)
@@ -405,7 +405,7 @@ void light_process_omni(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 v
405
405
vec3 binormal, vec3 tangent, float anisotropy,
406
406
#endif
407
407
inout vec3 diffuse_light, inout vec3 specular_light) {
408
- const float EPSILON = 1e- 3f ;
408
+ const float EPSILON = 1e- 6f ;
409
409
410
410
// Omni light attenuation.
411
411
vec3 light_rel_vec = omni_lights.data[idx].position - vertex;
@@ -700,7 +700,7 @@ void light_process_spot(uint idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 v
700
700
#endif
701
701
inout vec3 diffuse_light,
702
702
inout vec3 specular_light) {
703
- const float EPSILON = 1e- 3f ;
703
+ const float EPSILON = 1e- 6f ;
704
704
705
705
// Spot light attenuation.
706
706
vec3 light_rel_vec = spot_lights.data[idx].position - vertex;
0 commit comments