http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #13 from Tobias Jakobi liquid.acid@gmx.net 2008-11-02 14:03:23 --- Additional hacking:
I figured out that with my setup the GSLS program used for the PP screen processing was always no. 12.
Checked the traces and it was revealed that program 12 was composed out of shader objects 10, 11 and 13.
Object 10 (in PPE=high mode) was reading something from a rect sampler. Compared this with the code for PPE=medium. Not a rect sampler this time, but a normal 2d one. This was the only difference in the GLSL program code.
------------------------------------------------------------
Object 10 (PPE=high): #version 120 #extension GL_ARB_texture_rectangle : enable uniform vec4 PC[8]; uniform sampler2DRect Psampler0; uniform sampler2D Psampler2; vec4 T0 = gl_TexCoord[0]; vec4 T1 = gl_TexCoord[1]; vec4 T2 = gl_TexCoord[2]; vec4 R0; vec4 tmp0; vec4 tmp1; void main() { T0.xyzw = (texture2DRect(Psampler0, T0.xy).xyzw); tmp0.x = dot(T1.xyz, T0.xyz); tmp0.y = dot(T2.xyz, T0.xyz); T2.xyzw = (texture2D(Psampler2, tmp0.xy).xyzw); R0.xyzw = (mix(T0.xyzw, T2.xyzw, PC[4].xyzw)); gl_FragColor = R0; float Fog = clamp(gl_FogFragCoord * gl_Fog.start + gl_Fog.end, 0.0, 1.0); gl_FragColor.xyz = mix(gl_Fog.color.xyz, gl_FragColor.xyz, Fog); }
------------------------------------------------------------
For the GLSL source with PPE=medium just replace sampler2DRect with sampler2D and texture2DRect with texture2D.
My current ingame resolution is 640x480. This crude hack returns proper rendering of the bullettime effect:
In shader_glsl_generate_pshader (dlls/wined3d/glsl_shader.c) add this before the shader_generate_main(...) call: if (shader_obj == 10) { shader_addline(buffer, "T0.x = T0.x * 640.0;\n"); shader_addline(buffer, "T0.y = T0.y * 480.0;\n"); }
You probably have to adjust the 10 to the id that is used on your machine. 640.0 and 480.0 are of course the ingame resolutions.
Greets, Tobias