From 7955ce42fc03bfc94104fbc66110ae9eacdd43f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 29 May 2017 10:53:31 +0200 Subject: [PATCH] wined3d: Fix FFP lighting. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes a regression introduced by commit c329ee5673c5c9864611d9276e892abdf1d1a852. Signed-off-by: Józef Kucia Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/glsl_shader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 5f3af0394b..27116d08a8 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8265,7 +8265,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer continue; } shader_addline(buffer, "dir = normalize(dir);\n"); - shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i); + shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx); shader_addline(buffer, "}\n"); } @@ -8306,7 +8306,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer shader_addline(buffer, "}\n"); continue; } - shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i); + shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx); shader_addline(buffer, "}\n"); } @@ -8317,7 +8317,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer continue; shader_addline(buffer, "att = 1.0;\n"); shader_addline(buffer, "dir = normalize(ffp_light[%u].direction.xyz);\n", idx); - shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i); + shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx); } for (i = 0; i < settings->parallel_point_light_count; ++i, ++idx) @@ -8327,7 +8327,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer continue; shader_addline(buffer, "att = 1.0;\n"); shader_addline(buffer, "dir = normalize(ffp_light[%u].position.xyz);\n", idx); - shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i); + shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx); } shader_addline(buffer, "ffp_varying_diffuse.xyz = %s.xyz * ambient + %s.xyz * diffuse + %s.xyz;\n",