From 554aa70edccd39607985415b6499ab634a169911 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 15 Sep 2021 12:32:43 +0200 Subject: [PATCH] Follow-up of 9abebe5fbe6950d809b51926af8772317fe2657f - Modified shader gouraud_light_instanced.vs to be more Intel's cards friendly --- resources/shaders/gouraud_light_instanced.vs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/shaders/gouraud_light_instanced.vs b/resources/shaders/gouraud_light_instanced.vs index 997b6a2bf..a42f8e9a4 100644 --- a/resources/shaders/gouraud_light_instanced.vs +++ b/resources/shaders/gouraud_light_instanced.vs @@ -34,9 +34,7 @@ void main() float NdotL = max(dot(eye_normal, LIGHT_TOP_DIR), 0.0); intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE; - float width = 1.5 * i_scales.x; - float height = 1.5 * i_scales.y; - vec4 world_position = vec4(v_position * vec3(vec2(width), height) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0); + vec4 world_position = vec4(v_position * vec3(vec2(1.5 * i_scales.x), 1.5 * i_scales.y) + i_offset - vec3(0.0, 0.0, 0.5 * i_scales.y), 1.0); vec3 eye_position = (gl_ModelViewMatrix * world_position).xyz; intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(eye_position), reflect(-LIGHT_TOP_DIR, eye_normal)), 0.0), LIGHT_TOP_SHININESS);