wined3d: Clamp diffuse and specular color in GLSL vertex ffp replacement for core profile.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2016-03-25 22:50:24 +01:00 committed by Alexandre Julliard
parent 50dc7b95d1
commit 5e7a015b52
1 changed files with 5 additions and 0 deletions

View File

@ -6180,6 +6180,11 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, "gl_FrontColor = ffp_varying_diffuse;\n");
shader_addline(buffer, "gl_FrontSecondaryColor = ffp_varying_specular;\n");
}
else
{
shader_addline(buffer, "ffp_varying_diffuse = clamp(ffp_varying_diffuse, 0.0, 1.0);\n");
shader_addline(buffer, "ffp_varying_specular = clamp(ffp_varying_specular, 0.0, 1.0);\n");
}
for (i = 0; i < MAX_TEXTURES; ++i)
{