Merge pull request #53739 from Calinou/gles3-fix-light-flickering-2

Fix lights flickering in GLES3 when new light attenuation is disabled
This commit is contained in:
Rémi Verschelde 2021-10-12 22:11:41 +02:00 committed by GitHub
commit c44f24ebf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1356,7 +1356,7 @@ void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 bi
#ifdef USE_PHYSICAL_LIGHT_ATTENUATION #ifdef USE_PHYSICAL_LIGHT_ATTENUATION
spot_attenuation = get_omni_attenuation(light_length, spot_lights[idx].light_pos_inv_radius.w, spot_lights[idx].light_direction_attenuation.w); spot_attenuation = get_omni_attenuation(light_length, spot_lights[idx].light_pos_inv_radius.w, spot_lights[idx].light_direction_attenuation.w);
#else #else
spot_attenuation = pow(1.0 - normalized_distance, omni_lights[idx].light_direction_attenuation.w); spot_attenuation = pow(1.0 - normalized_distance, spot_lights[idx].light_direction_attenuation.w);
#endif #endif
} else { } else {
spot_attenuation = 0.0; spot_attenuation = 0.0;