From c29ade28afb0fb78f35a403fb357a4517aa6620a Mon Sep 17 00:00:00 2001 From: clayjohn Date: Thu, 18 Feb 2021 20:56:45 -0800 Subject: [PATCH] Multiply vertex lit DirectionalLights by albedo in GLES3 --- drivers/gles3/shaders/scene.glsl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index 78071ea51b0..021cf703152 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -2159,12 +2159,13 @@ FRAGMENT_SHADER_CODE #endif //#USE_LIGHT_DIRECTIONAL +#ifdef USE_VERTEX_LIGHTING + diffuse_light *= albedo; +#endif + #ifdef USE_FORWARD_LIGHTING -#ifdef USE_VERTEX_LIGHTING - - diffuse_light *= albedo; -#else +#ifndef USE_VERTEX_LIGHTING for (int i = 0; i < omni_light_count; i++) { light_process_omni(omni_light_indices[i], vertex, eye_vec, normal, binormal, tangent, albedo, transmission, roughness, metallic, specular, rim, rim_tint, clearcoat, clearcoat_gloss, anisotropy, specular_blob_intensity, diffuse_light, specular_light, alpha);