Commit ba61730d authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

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

parent 3894493a
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment