wined3d: Change fog output variable name for GLSL shaders

Jason Green jave27 at gmail.com
Fri Jun 9 17:34:04 CDT 2006


- gl_FogCoord is only an input variable, and we need to use an output
variable instead, so use gl_FogFragCoord which will send that data to
the fragment shader.

This makes the DX8.1 SDK Dolphin Demo work in GLSL at roughly the same
speed as ARB shaders (850-900 fps).
-------------- next part --------------
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index f8385e0..a04fbbd 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -161,7 +161,7 @@ void shader_glsl_get_register_name(
     SHADER_OPCODE_ARG* arg) {
 
     /* oPos, oFog and oPts in D3D */
-    const char* hwrastout_reg_names[] = { "gl_Position", "gl_FogCoord", "gl_PointSize" };
+    const char* hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" };
 
     DWORD reg = param & D3DSP_REGNUM_MASK;
     DWORD regtype = shader_get_regtype(param);


More information about the wine-patches mailing list