diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 846044f..e859f0f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3422,7 +3422,8 @@ static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_in * varyings. It shouldn't result in any real code executed on the GPU, since all read * input varyings are assigned above, if the optimizer works properly. */ - for(i = 0; i < in_count + 2; i++) { + for (i = 0; i < in_count; ++i) + { if(set[i] != WINED3DSP_WRITEMASK_ALL) { unsigned int size = 0; memset(reg_mask, 0, sizeof(reg_mask)); @@ -3443,18 +3444,10 @@ static void handle_ps3_input(SHADER_BUFFER *buffer, const WineD3D_GL_Info *gl_in size++; } - if (i == in_count) { - sprintf(destination, "gl_FrontColor"); - } else if (i == in_count + 1) { - sprintf(destination, "gl_FrontSecondaryColor"); - } else { - sprintf(destination, "IN[%u]", i); - } - if (size == 1) { - shader_addline(buffer, "%s.%s = 0.0;\n", destination, reg_mask); + shader_addline(buffer, "IN[%u].%s = 0.0;\n", i, reg_mask); } else { - shader_addline(buffer, "%s.%s = vec%u(0.0);\n", destination, reg_mask, size); + shader_addline(buffer, "IN[%u].%s = vec%u(0.0);\n", i, reg_mask, size); } } }