wined3d: Avoid calculating 1 / (fog_end - fog_start) in the shader.

This commit is contained in:
Stefan Dösinger 2013-08-01 12:25:55 +02:00 committed by Alexandre Julliard
parent 3894493a76
commit ba61730daa
1 changed files with 1 additions and 2 deletions

View File

@ -4502,8 +4502,7 @@ static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer,
return;
case WINED3D_FFP_PS_FOG_LINEAR:
/* Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start) */
shader_addline(buffer, "float Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start);\n");
shader_addline(buffer, "float Fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;\n");
break;
case WINED3D_FFP_PS_FOG_EXP: