http://bugs.winehq.org/show_bug.cgi?id=7901
Summary: ShaderStudio: rcp instruction works incorrectly in vertex shaders 1.1/wine 0.9.33 Product: WineHQ Apps Database Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: trivial Priority: P2 Component: website-bugs AssignedTo: wine-bugs@winehq.org ReportedBy: ErV2005@rambler.ru
rcp instruction doesn't seem to work correctly in vertex shaders 1.1/DirectX 8.1 application when given certain source swizzles (like .xy, .xz etc) The following shader causes incorrect graphical output (not a Windows equivalent) (v7 is a 2D texture coordinate register): vs.1.1 def c0, 0.5, 1.0, 2.0, 4.0 mad r0.xy, v7.xy, c0.zz, -c0.yy mov oPos.x, r0.x mov oPos.y, -r0.y mov oPos.z, c0.x mov oPos.w, c0.y mov oT0,v7 mov r0.xyzw, c0.y rcp r0.xy, r0.xy ; here is a problem
as you can see, shader merely maps mesh texture to the screen (unwraps it). Howewer it will work only if either single channel specified as rpc source, or if all of them are used. I.e. shader works with: rcp r0.xy, r0.x rcp r0.xy, r0.xyzw rcp r0, r0 but doesn't work with: rcp r0.xy, r0.xy rcp r0.xy, r0.zx etc. If a "wrong" rcp source is present, mesh disappers from screen immediatly. I believe this can be one of problems that causes buggy water in HalfLife2.
Brief system description: Slackware 11, kernel 2.6.17.13, wine 0.9.33, GeForce 7100 GS, NVidia propietary driver version 1.0-9755, AMD Sempron 2800+ processor.
All Wine libraries were builtin, except d3dxof.dll was taken from WINDOWS/ Sytem32 directory (Shader Studio was unable to load meshes with Wine version of d3dxof.dll). Wine wasn't changed in any way.
The possible location of bug can be somethere in a functions that map pixel shader to opengl shader. I wasn't able to pinpoint exact location.