http://bugs.winehq.org/show_bug.cgi?id=14762
--- Comment #14 from Tobias Jakobi liquid.acid@gmx.net 2008-11-02 17:09:01 --- Note to me: Try to understand the functions Henri told me. Look for functions (in glsl_shader.c) calling shader_glsl_get_sample_function.
List of functions where texrect has an effect: pshader_glsl_tex shader_glsl_texldl
Figure out a effective way of passing texture dimensions for fixup into the GLSL shader.
Static hardcoding would be the best in the case of Max Payne 2 since the texture dimension only changes when the ingame resolution is switched. This can't be done while the engine is running. A restart is needed.
However this doesn't look like a good generic way to do this. Need more input on this one...
Or pass tex dimensions via another texcoord, uniform, whatever. Still don't know GLSL well enough... :(