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:
parent
50dc7b95d1
commit
5e7a015b52
|
@ -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_FrontColor = ffp_varying_diffuse;\n");
|
||||||
shader_addline(buffer, "gl_FrontSecondaryColor = ffp_varying_specular;\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)
|
for (i = 0; i < MAX_TEXTURES; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue