mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 12:03:39 +00:00
wined3d: Use ffp_normalize in shader_glsl_ffp_vertex_lighting_footer.
This commit is contained in:
parent
79b92a6d39
commit
17d64ac1e0
|
@ -8854,9 +8854,9 @@ static void shader_glsl_ffp_vertex_lighting_footer(struct wined3d_string_buffer
|
|||
shader_addline(buffer, "diffuse += clamp(dot(dir, normal), 0.0, 1.0)"
|
||||
" * ffp_light[%u].diffuse.xyz * att;\n", idx);
|
||||
if (settings->localviewer)
|
||||
shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n");
|
||||
shader_addline(buffer, "t = dot(normal, ffp_normalize(dir - ffp_normalize(ec_pos.xyz)));\n");
|
||||
else
|
||||
shader_addline(buffer, "t = dot(normal, normalize(dir + vec3(0.0, 0.0, -1.0)));\n");
|
||||
shader_addline(buffer, "t = dot(normal, ffp_normalize(dir + vec3(0.0, 0.0, -1.0)));\n");
|
||||
shader_addline(buffer, "if (dot(dir, normal) > 0.0 && t > 0.0%s) specular +="
|
||||
" pow(t, ffp_material.shininess) * ffp_light[%u].specular * att;\n",
|
||||
legacy_lighting ? " && ffp_material.shininess > 0.0" : "", idx);
|
||||
|
|
Loading…
Reference in a new issue