http://bugs.winehq.org/show_bug.cgi?id=27145
Summary: Weapons Translucent Like Glass in FEAR 1 and 2. Product: Wine Version: 1.3.19 Platform: x86 OS/Version: Mac OS X 10.6 Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: smoke.tetsu@gmail.com
The weapons and player arms seem to now be translucent like glass in FEAR 1 & 2 although mouse support is better especially for FEAR 1.
http://bugs.winehq.org/show_bug.cgi?id=27145
smoke.tetsu smoke.tetsu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine-bugs@winehq.org Component|-unknown |directx-d3dx9 Version|1.3.19 |1.3.20
--- Comment #1 from smoke.tetsu smoke.tetsu@gmail.com 2011-05-14 04:17:39 CDT --- The same thing still happens in 1.3.20 but it seems it started happening after the latest direct3d9 changes so that may have something to do with it.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #2 from smoke.tetsu smoke.tetsu@gmail.com 2011-05-14 05:43:54 CDT --- Created an attachment (id=34695) --> (http://bugs.winehq.org/attachment.cgi?id=34695) A screenshot of FEAR 2 in WINE 1.3.18
As you can see it looks normal here.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #3 from smoke.tetsu smoke.tetsu@gmail.com 2011-05-14 05:44:35 CDT --- Created an attachment (id=34696) --> (http://bugs.winehq.org/attachment.cgi?id=34696) A screenshot of FEAR 2 in WINE 1.3.19
As you can see the weapon is now translucent like it's made out of glass.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #4 from smoke.tetsu smoke.tetsu@gmail.com 2011-05-14 10:14:37 CDT --- Created an attachment (id=34700) --> (http://bugs.winehq.org/attachment.cgi?id=34700) A Screenshot of FEAR (original) showing it WINE 1.3.18
Normal weapon.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #5 from smoke.tetsu smoke.tetsu@gmail.com 2011-05-14 10:15:45 CDT --- Created an attachment (id=34701) --> (http://bugs.winehq.org/attachment.cgi?id=34701) A Screenshot of FEAR (original) showing it WINE 1.3.19
Translucent weapon in 1.3.19.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #6 from Berillions berillions@gmail.com 2011-06-18 08:07:21 CDT --- Created an attachment (id=35190) --> (http://bugs.winehq.org/attachment.cgi?id=35190) A Screenshot of FEAR (original) showing it WINE 1.3.22
The guns are totally invisible with this version of wine.
http://bugs.winehq.org/show_bug.cgi?id=27145
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #7 from GyB gyebro69@gmail.com 2011-06-18 13:39:35 CDT --- I'm experiencing the same problem in F.E.A.R v1.08 so confirming: the player's hands and the weapon are invisible.
This is a regression, caused by
dbc8702e44a987b77cdf9af31b964bb27e86fa92 is the first bad commit commit dbc8702e44a987b77cdf9af31b964bb27e86fa92 Author: Stefan Dösinger stefan@codeweavers.com Date: Wed Apr 20 16:28:05 2011 +0200
wined3d: Scale the depthbias factor by the depth buffer's depth.
:040000 040000 12e71355fbcd1fd575e308dc1ba3e018cca97f05 28afcc5b99924faaf8ccc000e0402f349299ab62 M dlls
Please add Stefan to CC so he can be informed about the problem.
Fedora 15 Nvidia GeForce 250 / driver 275.09.07
http://bugs.winehq.org/show_bug.cgi?id=27145
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Status|UNCONFIRMED |NEW CC| |stefandoesinger@gmx.at, | |wylda@volny.cz Ever Confirmed|0 |1
--- Comment #8 from Wylda wylda@volny.cz 2011-06-18 14:03:28 CDT ---
I've just end up with the same faulty commit ;) Changing to NEW.
http://bugs.winehq.org/show_bug.cgi?id=27145
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.3.20 |1.3.19 OS/Version|Mac OS X 10.6 |Linux
--- Comment #9 from Wylda wylda@volny.cz 2011-06-18 14:07:13 CDT ---
Changing the version, as the commit is wine-1.3.18-168-gdbc8702.
http://bugs.winehq.org/show_bug.cgi?id=27145
Berillions berillions@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |berillions@gmail.com
--- Comment #10 from Berillions berillions@gmail.com 2011-06-18 15:28:12 CDT --- I don't know if the problem (invisibility) is the same bug for Assassin's Creed (invisible ground) : http://bugs.winehq.org/show_bug.cgi?id=27480
But, this bug exist in AC since many versions of wine.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #11 from smoke.tetsu smoke.tetsu@gmail.com 2011-06-21 07:37:45 CDT --- That new screenshot of FEAR running in WINE 1.3.22 looks even worse than my screenshots in 1.3.19 because while on mine you can at least see the weapons and they are translucent like glass in the latter screenshot in 1.3.22 you can't see the weapon AT ALL.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #12 from Stefan Dösinger stefandoesinger@gmx.at 2011-06-22 15:45:50 CDT --- Can you attach a +d3d,+d3d_surface,+d3d_texture log?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #13 from Wylda wylda@volny.cz 2011-06-22 16:18:30 CDT ---
Can you attach a +d3d,+d3d_surface,+d3d_texture log?
http://www.4shared.com/file/axjtV0mc/console_logtxt.html
I hope, that it will work. First time using this 4shared service ;)
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #14 from GyB gyebro69@gmail.com 2011-07-02 12:35:23 CDT --- Can be reproduced in the demo, too (requires native d3dx9_36.dll).
http://www.gamershell.com/download_10167.shtml
http://bugs.winehq.org/show_bug.cgi?id=27145
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.gamershell.com/d | |ownload_10167.shtml
http://bugs.winehq.org/show_bug.cgi?id=27145
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3dx9 |directx-d3d
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #15 from Henri Verbeet hverbeet@gmail.com 2011-07-02 16:58:08 CDT --- Created an attachment (id=35406) --> (http://bugs.winehq.org/attachment.cgi?id=35406) patch
Does this patch make it any better?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #16 from Berillions berillions@gmail.com 2011-07-02 18:15:39 CDT --- Hi Henri,
Thanks for your patch but it does not works. I tried it with wine-git and the weapons are still invisible.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #17 from Henri Verbeet hverbeet@gmail.com 2011-07-03 00:07:19 CDT --- (In reply to comment #16)
Thanks for your patch but it does not works. I tried it with wine-git and the weapons are still invisible.
My bad. FEAR is d3d9, that patch is for d3d8 and earlier applications.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #18 from Berillions berillions@gmail.com 2011-07-04 15:53:29 CDT --- (In reply to comment #17)
(In reply to comment #16)
Thanks for your patch but it does not works. I tried it with wine-git and the weapons are still invisible.
My bad. FEAR is d3d9, that patch is for d3d8 and earlier applications.
It's not serious, the game works correctly with wine 1.1.43... No mouse problem and no weapons problems, while waiting for the correct patch :)
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #19 from Wylda wylda@volny.cz 2011-07-15 15:05:12 CDT ---
This regression (bisected) is still present in wine-1.3.24-174-g4b4dd30.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #20 from Berillions berillions@gmail.com 2011-07-23 12:45:49 CDT --- Still present in wine 1.3.25
http://bugs.winehq.org/show_bug.cgi?id=27145
Tobias Jakobi liquid.acid@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |liquid.acid@gmx.net
--- Comment #21 from Tobias Jakobi liquid.acid@gmx.net 2011-07-31 08:53:11 CDT --- Seems like I'm also experiencing this issue, both on i965 and r600g.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #22 from Berillions berillions@gmail.com 2011-08-09 08:57:12 CDT --- This bug still exist for F.E.A.R 1 and 2 with wine 1.3.26.
http://bugs.winehq.org/show_bug.cgi?id=27145
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Regression SHA1| |dbc8702e44a987b77cdf9af31b9 | |64bb27e86fa92
http://bugs.winehq.org/show_bug.cgi?id=27145
Brandon Dulaney Draygera@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Draygera@gmail.com
--- Comment #23 from Brandon Dulaney Draygera@gmail.com 2011-08-21 16:48:03 CDT --- I've tested that bug too. Got the same results. I did a diff between the dlls/wined3d/state.c and dlls/wined3d/device.c files. I want to help fix this problem. Could anyone link me to some information about why certain implementations were made and how to contact developers. Please and thank you.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #24 from Stefan Dösinger stefandoesinger@gmx.at 2011-08-21 17:49:13 CDT --- I usually write comments in the code or explanations in the commit messages explaining the change, pretty much every other Wine developer does that too. In this case the comment above state_depthbias should give a basic explanation what this scaling does. You'll also need background information about the D3DRS_DEPTHBIAS render state and glPolygonOffset.
Posting in the proper bug report or mailing Wine-devel is preferred over contacting the developer privately. I usually ignore private messages because they make it impossible for other people to follow the discussion and development.
I'm not sure what you mean by "diff", but if you tried to figure out what changed, then "git show dbc8702e44a987b77cdf9af31b964bb27e86fa92" will show you the changes made by the patch that was identified as the cause of this regression.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #25 from Brandon Dulaney Draygera@gmail.com 2011-08-21 20:20:36 CDT --- diff -a <file1> <file2> >> file.txt command on Linux does the same thing as git show but puts it into a text file to look at. I just recently started using git, so I'm still learning about its options.
Thank you for a quick response. I'll check that out; I'm a beginning programmer and WINE is a very appealing project I'd want to help with.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #26 from Berillions berillions@gmail.com 2011-09-13 04:26:50 CDT --- The bug still exist with wine 1.3.28
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #27 from GyB gyebro69@gmail.com 2011-09-19 10:14:58 CDT --- Created an attachment (id=36466) --> (http://bugs.winehq.org/attachment.cgi?id=36466) screenshot (Spellforce 2)
Commit [dbc8702e44a987b77cdf9af31b964bb27e86fa92] causes visual glitches in Spellforce 2 too. As you turn around the camera you can observe that units, NPCs are drawn over objects (walls, buildings).
http://bugs.winehq.org/show_bug.cgi?id=27145
mennozon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mennozon@gmail.com
--- Comment #28 from mennozon@gmail.com 2011-09-19 16:35:33 CDT --- might be an off by one (if that's what it called) the following patch fixes the gun issue but i haven't tested it in other games
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #29 from mennozon@gmail.com 2011-09-19 16:36:10 CDT --- Created an attachment (id=36471) --> (http://bugs.winehq.org/attachment.cgi?id=36471) fix for 'glass' gun in fear 2
http://bugs.winehq.org/show_bug.cgi?id=27145
mennozon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36471|0 |1 is obsolete| |
--- Comment #30 from mennozon@gmail.com 2011-09-19 16:40:04 CDT --- (From update of attachment 36471) this is wrong, typo in there
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #31 from mennozon@gmail.com 2011-09-19 17:06:47 CDT --- Created an attachment (id=36473) --> (http://bugs.winehq.org/attachment.cgi?id=36473) this fixes it for me, but i haven't tested it in any other games
to be fair i have no clue why this works other than that i can see my guns in fear 2 ;-)
http://bugs.winehq.org/show_bug.cgi?id=27145
mennozon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36473|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=27145
mennozon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36473|1 |0 is obsolete| |
--- Comment #32 from mennozon@gmail.com 2011-09-19 17:32:49 CDT --- (From update of attachment 36473) --- orig/wine-1.3.28/dlls/wined3d/state.c 2011-09-09 19:43:48.000000000 +0200 +++ wine-1.3.28/dlls/wined3d/state.c 2011-09-20 00:19:10.116608448 +0200 @@ -1694,7 +1694,7 @@ if (depth) { const struct wined3d_format *fmt = depth->resource.format; - scale = powf(2, fmt->depth_size) - 1; + scale = powf(2, fmt->depth_size) / 1000 ; TRACE("Depth format %s, using depthbias scale of %.8e.\n", debug_d3dformat(fmt->id), scale); }
http://bugs.winehq.org/show_bug.cgi?id=27145
mennozon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #36473|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #33 from mennozon@gmail.com 2011-09-19 17:37:41 CDT --- Created an attachment (id=36474) --> (http://bugs.winehq.org/attachment.cgi?id=36474) another patch, last one had graphics issues in halflife2
sorry for the comment/attachment spam, not really familiar with bugzilla
this patch at least gives me weapons visable and i havent had any issues in halflife 2, will give some more games a try but perhaps someone who knows more about this might get an idea as to why this works and perhaps find a better fix.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #34 from Brandon Dulaney Draygera@gmail.com 2011-09-19 17:45:08 CDT --- Currently testing patches. Patched successfully; will post results as soon as it finishes compiling.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #35 from Stefan Dösinger stefandoesinger@gmx.at 2011-09-19 17:45:48 CDT --- What kind of depth scale parameters does Fear set, and what depth format does it use?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #36 from Brandon Dulaney Draygera@gmail.com 2011-09-19 20:24:46 CDT --- Original patch worked correctly for this game. Now could somebody possibly come up with a way to stop the lag from saving? Please and Thank you.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #37 from Stefan Dösinger stefandoesinger@gmx.at 2011-09-20 09:22:30 CDT ---
From IRC: <mogorva> Greetings to all! One of the wine devs asked if someone could determine what depth scale parameters a certain game uses. I'm referring to bug 27145 <mogorva> How can I find that out? I presume I need a +d3d debug log,but what exactly is needed from the log?
What I'm interested in is pretty much the output of the two TRACE lines in state_depthbias in state.c. You can either run a +d3d log and filter grep for state_depthbias, change the TRACE to an ERR, recompile and run without any special debug flags.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #38 from GyB gyebro69@gmail.com 2011-09-20 09:40:51 CDT --- (In reply to comment #37)
From IRC:
<mogorva> Greetings to all! One of the wine devs asked if someone could determine what depth scale parameters a certain game uses. I'm referring to bug 27145 <mogorva> How can I find that out? I presume I need a +d3d debug log,but what exactly is needed from the log?
What I'm interested in is pretty much the output of the two TRACE lines in state_depthbias in state.c. You can either run a +d3d log and filter grep for state_depthbias, change the TRACE to an ERR, recompile and run without any special debug flags.
I found these:
F.E.A.R 1: trace:d3d:state_depthbias Depth format WINED3DFMT_D24_UNORM_S8_UINT, using depthbias scale of 1.67772150e+07.
Spellforce 2: trace:d3d:state_depthbias Depth format WINED3DFMT_D32_UNORM, using depthbias scale of 4.29496730e+09.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #39 from Stefan Dösinger stefandoesinger@gmx.at 2011-09-20 09:44:21 CDT --- Can you add an additional debug statement to print scale_bias.f and const_bias.f?
But my main suspicion that the game uses floating point depth buffers didn't come true.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #40 from smoke.tetsu smoke.tetsu@gmail.com 2011-09-22 17:40:58 CDT --- Just a note here that Condemned Criminal Origins which is on the same engine as FEAR1\2 and from the same studio also exhibits the problem.
I've added a screenshot.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #41 from smoke.tetsu smoke.tetsu@gmail.com 2011-09-22 17:41:30 CDT --- Created attachment 36516 --> http://bugs.winehq.org/attachment.cgi?id=36516 Screenshot of the bug in Condemned Criminal Origins by Monolith
http://bugs.winehq.org/show_bug.cgi?id=27145
Jeremy Chin rekless@fastmail.fm changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rekless@fastmail.fm
--- Comment #42 from Jeremy Chin rekless@fastmail.fm 2011-11-25 19:38:20 CST --- Stefan,
Can you add an additional debug statement to print scale_bias.f and const_bias.f?
I'm seeing: err:d3d:state_depthbias Scale bias: -3.00000000e+00, const bias -1.78813949e-07 err:d3d:state_depthbias Scale bias: -6.00000000e+00, const bias -3.57627897e-07 err:d3d:state_depthbias Scale bias: 0.00000000e+00, const bias -5.00000000e-01
This is from the FEAR 2 demo.
http://bugs.winehq.org/show_bug.cgi?id=27145
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #43 from Stefan Dösinger stefan@codeweavers.com 2011-12-01 15:41:06 CST --- FEAR 1 is setting WINED3DRS_DEPTHBIAS = -0.5, which is a pretty large value. E.g. Fear itself uses -0.000000178... for the decals, which is a sane value. The d3d value is simply added to the z coordinates of the fragments, so -0.5 is half the depth range.
I've no idea yet for a proper fix. My first guess would be that there's something that disables the polygon offset. The game is never using pretransformed vertices, which excludes the most likely candidate. Other things I can imagine are that d3d adds the depth bias after clipping, that there is a maximum bias or that the depth bias is ignored if the pixel shader writes Z values.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #44 from Stefan Dösinger stefan@codeweavers.com 2011-12-01 17:08:15 CST --- Created attachment 37734 --> http://bugs.winehq.org/attachment.cgi?id=37734 A hacky depthbias test
The attached test demonstrates that in d3d9 clipping ignores the depth bias.
I don't see any obvious way to handle this. We could try to catch strange offsets like the -0.5 FEAR uses. However, bug 27264 looks pretty similar, and the D3DRS_DEPTHBIAS value there looks sane. I'll see if I find anything in the GL spec and the r500/r600 hardware specs.
http://bugs.winehq.org/show_bug.cgi?id=27145
Christian christian.frank@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.frank@gmx.de
--- Comment #45 from Christian christian.frank@gmx.de 2011-12-11 06:38:06 CST --- Hi Stefan,
i can confirm this issue using a Geforce GTX 560 Ti. So i guess this has nothing to do with R500/R600 hw.
Best regards, Christian
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #46 from Stefan Dösinger stefan@codeweavers.com 2011-12-11 13:39:10 CST --- Created attachment 37930 --> http://bugs.winehq.org/attachment.cgi?id=37930 glPolygonOffset vs clipping GL demo
I am not sure if this is a bug in the drivers or a difference between the GL spec and d3d behavior. The attached program tests if the polygon offset influences clipping. It draws a green quad that is clipped on the left and right side and changes the polygon offset. If the driver behaves like d3d the green area doesn't move, otherwise it does.
Page 188 of the OpenGL 4.2 Core Profile says that with fixed-point depth buffers are "limited to the range [0;1] by clamping after offset addition is performed". As I understand it that means that GL should behave like d3d does, and the drivers get it wrong. However, the spec has apparently been edited. Also it is unclear what should happen to depth values that are outside [0;1] *before* the polygon offset is added.
My d3d program shows a moving green area on the nvidia driver, and a static one on fglrx(Radeon HD 5770) and OSX Lion(Radeon X1600). I'd be happy if people could test it on various Mesa drivers, my Mesa setup is still broken. You can compile the app with gcc polygonoffset.c -o polygonoffset -lGL -lglut .
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #47 from Christian christian.frank@gmx.de 2011-12-16 15:26:22 CST --- well, i just tried this n my box with nvidia gtx560+290.10 driver...
should the moving be noticable ???
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #48 from Stefan Dösinger stefan@codeweavers.com 2011-12-19 04:46:30 CST --- On my system it is quite obvious, it moves all the way to the left in about 10 seconds and then jumps to the right. Can you reproduce the FEAR bug on that system?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #49 from Christian christian.frank@gmx.de 2011-12-19 12:18:41 CST --- strange..on my system the green bar moves but VERY slow..i take ages until it reaches on side..didn't wait that long yet..
Yes, i can confirm the issue on my system ..with fear2..
I have a gtx 560ti to with nvidia 290.10 drivers on it..
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #50 from Stefan Dösinger stefan@codeweavers.com 2011-12-19 17:04:05 CST --- Oh, I guess you have vsync on, which limits the app to 60 frames per second, rather than the probably multiple thousands I get. But the basic issue is around.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #51 from Jeremy Chin rekless@fastmail.fm 2011-12-19 18:03:28 CST --- Stefan,
On the Intel driver (2.14.0, probably GMA4500MHD) the box doesn't move. I'm pretty sure I won't be able to test FEAR itself on this laptop.
Could this be a hack to force the weapons to draw on top of everything else? The depth test will be correct relative to other parts of the weapon, but with a huge offset it should always come up above the rest of the scene.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #52 from Stefan Dösinger stefan@codeweavers.com 2011-12-20 03:16:46 CST --- It's possible that the game works on Intel GPUs, especially if you have an up-to-date kernel and Mesa version. Otherwise, bug 27264 seems to be exactly the same issue, and the game appears to be less demanding, especially in the main menu where the bug occurs.
It might be a hack like that, but I have my doubts. The weapon would be properly clipped, but not depth-tested. It is possible that they don't need depth testing for the weapon at all(e.g. proper draw order, or culling being enough for hidden surface removal), but it that case they could just disable the depth test and get the same result.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #53 from Henri Verbeet hverbeet@gmail.com 2012-02-16 06:36:34 CST --- (In reply to comment #46)
Created attachment 37930 [details] glPolygonOffset vs clipping GL demo
I am not sure if this is a bug in the drivers or a difference between the GL spec and d3d behavior. The attached program tests if the polygon offset influences clipping. It draws a green quad that is clipped on the left and right side and changes the polygon offset. If the driver behaves like d3d the green area doesn't move, otherwise it does.
Afaik clipping is conceptually supposed to happen before polygon offset in OpenGL. Polygon offset making a difference for clipping sounds questionable to me, you might want to ask the relevant driver developers about that.
Page 188 of the OpenGL 4.2 Core Profile says that with fixed-point depth buffers are "limited to the range [0;1] by clamping after offset addition is performed". As I understand it that means that GL should behave like d3d does, and the drivers get it wrong. However, the spec has apparently been edited. Also it is unclear what should happen to depth values that are outside [0;1] *before* the polygon offset is added.
Probably nothing specific, although it should be noted that you're not supposed to have any unless they're explicitly generated by a fragment shader. Regular vertex depth values would be clipped to [-Wc;+Wc] and then mapped to [0;1] by the W divide and depth range transform.
Is there any chance D3DRS_ZENABLE is disabled when the gun is drawn?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #54 from Wylda wylda@volny.cz 2012-05-05 06:28:20 CDT ---
Still present in wine-1.5.3-164-gdec3d50.
Is there any chance D3DRS_ZENABLE is disabled when the gun is drawn?
What should one perform to be able to provide an answer?
--- Comment #55 from Berillions berillions@gmail.com 2012-05-05 16:39:26 CDT --- (In reply to comment #54)
Still present in wine-1.5.3-164-gdec3d50.
Is there any chance D3DRS_ZENABLE is disabled when the gun is drawn?
What should one perform to be able to provide an answer?
Wylda,
To play correctly at F.E.A.R and F.E.A.R.2, do you use an older Wine version or do you play on Windows ?
If your use an older wine version, which version do you use ?
Thanks
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #56 from Berillions berillions@gmail.com 2012-08-10 08:35:23 CDT --- Still present in Wine 1.5.10... This bug could be resolved one day or not ?
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #57 from Berillions berillions@gmail.com 2012-12-30 05:36:47 CST --- Created attachment 43021 --> http://bugs.winehq.org/attachment.cgi?id=43021 Weapons F.E.A.R.2 + Wine 1.5.20
Hi guys,
I play at this game with Wine 1.5.20 and i'm suprised to see that the weapons are visible and translucent like on my screenshot.
So the bug is not completly resolved but it's already a good thing :)
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #58 from Brandon Dulaney Draygera@gmail.com 2013-02-24 11:29:05 CST --- I'm using Wine-1.5.24 and this regression is still present in the game after doing a wine regression test.
commit dbc8702e44a987b77cdf9af31b964bb27e86fa92 is still a bad commit.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #59 from Henri Verbeet hverbeet@gmail.com 2013-06-12 06:17:24 CDT --- (In reply to comment #54)
Is there any chance D3DRS_ZENABLE is disabled when the gun is drawn?
What should one perform to be able to provide an answer?
That was mostly a question for Stefan, since he was debugging this. You'd need to look at individual draws to find the one that draws the gun, and then look at the D3DRS_ZENABLE state.
http://bugs.winehq.org/show_bug.cgi?id=27145
Jonas Jelten jonas.jelten@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jonas.jelten@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #60 from Jonas Jelten jonas.jelten@gmail.com 2013-07-31 19:21:54 CDT --- This still seems to be the case with wine 1.6
I can't see my weapon or hands, but I CAN see my hands when climbing a latter...
Running with DVD installation for F.E.A.R. 1., vanilla win32 wineprefix & no winetricks, funtoo linux, gtx275 + nvidia binary 325.08, linux kernel 3.9.7.
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #61 from Andrey Gusev andrey.goosev@gmail.com 2013-11-23 06:14:14 CST --- Still present in 1.7.7
http://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #62 from Berillions berillions@gmail.com --- Still exist in Wine 1.7.10 Same graphi glitch like in the screenshot in my comment #57
http://bugs.winehq.org/show_bug.cgi?id=27145
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.goosev@gmail.com
--- Comment #63 from Andrey Gusev andrey.goosev@gmail.com --- Still in 1.7.17
https://bugs.winehq.org/show_bug.cgi?id=27145
David Gámiz Jiménez david.gamiz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |david.gamiz@gmail.com
--- Comment #64 from David Gámiz Jiménez david.gamiz@gmail.com --- Hi all,
This bug Still in 1.7.46.
And is true in 1.3.18. The bug not present. The bad notice, is that, my usb mouse don’t work properly... Only effect not work is soft shadows... all rest okey.
Test in my FEAR 1 and 2 original Steam and Condemned - Criminal Origins Demo.
It possible correct this issue??
I am waiting for play all saga FEAT in my Linux Wine system! :D
Thank devs and community! ;)
David Gámiz Jiménez
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #65 from Stefan Dösinger stefan@codeweavers.com --- I'll try again to contact Nvidia about this, I believe its their bug. If anyone sees this on non-Nvidia drivers please say so.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #66 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Stefan Dösinger from comment #65)
I'll try again to contact Nvidia about this, I believe its their bug. If anyone sees this on non-Nvidia drivers please say so.
The problem reported here as well as bug #28916 are present with the open source nouveau driver + Mesa3D git version too.
Fedora 22 wine-1.7.46-67-g6b205e4 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] (rev a2) (prog-if 00 [VGA controller]) Nouveau 1.0.11 + Mesa 10.6-branchpoint-776-g4caaa26
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #67 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Stefan Dösinger from comment #65)
I'll try again to contact Nvidia about this, I believe its their bug. If anyone sees this on non-Nvidia drivers please say so.
Hi Stefan,
it is strange that only because of nvidia. When before version 1.3.19 (if I remember correctly) and earlier there was this problem.
And with NVIDIA unified drivers in Windows if it looks good this aspect of the game.
Finally, even stranger, there are many versions and updated NVIDIA drivers, and usually fix bugs affecting wine. I remember one of Far Cry. But in a game of this level still have not done anything, it is strange for the part of nvidia.
I hope you can help us and find the solution would be fantastic. They are great games and many people can play perfectly in Linux (or Mac).
Regards. :)
David Gámiz Jiménez
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #68 from Stefan Dösinger stefan@codeweavers.com --- Prior to version 1.3.20 we misinterpreted the polygon offset and that caused problems in games like Mass Effect 2 (flickering decals). FEAR sets an insanely large polygon offset (Half the Z buffer range), and the offset pulls the geometry in front of the camera. That's not supposed to matter because polygon offset is applied after Z clipping. On Nvidia that's not the case, so the geometry gets clipped away. The difference is demonstrated by attachment 37930.
It's interesting but not totally surprising that Nouveau is affected as well. I guess the polygon offset vs Z clipping behavior is due to the hardware design and not a simple driver bug.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #69 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Stefan Dösinger from comment #68)
Prior to version 1.3.20 we misinterpreted the polygon offset and that caused problems in games like Mass Effect 2 (flickering decals). FEAR sets an insanely large polygon offset (Half the Z buffer range), and the offset pulls the geometry in front of the camera. That's not supposed to matter because polygon offset is applied after Z clipping. On Nvidia that's not the case, so the geometry gets clipped away. The difference is demonstrated by attachment 37930 [details].
It's interesting but not totally surprising that Nouveau is affected as well. I guess the polygon offset vs Z clipping behavior is due to the hardware design and not a simple driver bug.
Question from ignorance.
You can deploy an exception for these games, to make it look good.
With part of code that worked before 1.3.19?
It sounds very bad solution ... but it's something no?
Or an option to select from a cfg or something?
:)
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #70 from Stefan Dösinger stefan@codeweavers.com --- No, we won't put game specific hacks into the tree, this would result in unmaintainable code very quickly.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #71 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Stefan Dösinger from comment #70)
No, we won't put game specific hacks into the tree, this would result in unmaintainable code very quickly.
I perfectly understand ... :(
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #72 from David Gámiz Jiménez david.gamiz@gmail.com --- Hi Stefan,
I've compiled your demo: "glPolygonOffset vs clipping GL demo"
With the instruction you gave: gcc polygonoffset.c -o polygonoffset -lGL -lglut
My system is Ubuntu 14.04 64bit, AMD Phenom X4 and NVIDIA 560 Ti driver 346.72
In launching the program, I see a window, a green area in the middle static and white to the sides.
This result validates that the problem is in the nvidia driver??
Thanks for your great work.
A greeting,
David Gámiz Jiménez
PS: Got a response from nvidia? I hope you can find the solution for this problem to enjoy these 4 games without this problem will be perfect. :)
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #73 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 51839 --> https://bugs.winehq.org/attachment.cgi?id=51839 wined3d: Try to detect the polygon offset scale value.
This patch fixes the issue for me. I still have to test it on more drivers (especially MacOS) to make sure the fix and accompanying test work reliably.
The Nvidia clipping bug was fixed at some point, but as described in the patch file we run into a different problem that produces the same symptoms now. Using a better scaling factor for the polygon offset avoids both problems.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #74 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Stefan Dösinger from comment #73)
Created attachment 51839 [details] wined3d: Try to detect the polygon offset scale value.
This patch fixes the issue for me. I still have to test it on more drivers (especially MacOS) to make sure the fix and accompanying test work reliably.
The Nvidia clipping bug was fixed at some point, but as described in the patch file we run into a different problem that produces the same symptoms now. Using a better scaling factor for the polygon offset avoids both problems.
Thanks Stefan.
Whenever I get time apply your patch, and compile.
Never compile 64bit wine on my system 64bits, and from what I saw once, it is complex.
As soon as you applied the patch I try it and tell you how it works.
Thank you!! :D
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #75 from Wylda wylda@volny.cz --- (In reply to Stefan Dösinger from comment #73)
wined3d: Try to detect the polygon offset scale value.
Hi Stefan, thanks for working on this. I tried wine-1.7.47 with this patch. After applying it fixed the issue for me too.
Debian Jessie, Nvidia GT240 v340.65
But I noticed, that at the beginning when you are transported by the helicopter, there are no "Helicopter Propellers" (https://www.youtube.com/watch?v=tnlccY78pG8 at 9:30). It would be nice, if somebody has wine-1.3.18 or older for the test, whether this is related or completely separate issue.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #76 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Wylda from comment #75)
(In reply to Stefan Dösinger from comment #73)
wined3d: Try to detect the polygon offset scale value.
Hi Stefan, thanks for working on this. I tried wine-1.7.47 with this patch. After applying it fixed the issue for me too.
Debian Jessie, Nvidia GT240 v340.65
But I noticed, that at the beginning when you are transported by the helicopter, there are no "Helicopter Propellers" (https://www.youtube.com/watch?v=tnlccY78pG8 at 9:30). It would be nice, if somebody has wine-1.3.18 or older for the test, whether this is related or completely separate issue.
Hi Wylda,
I just tried the patch and it works perfectly, also helicopters. Both FEAR 1 and its two expansions. All rest try FEAR 2 and DLC, for last Condenamed 1.
@Stefan This is a real madness, in just one week you've found a solution!!! BILLION THANKS!! HUGE JOB! O__O
In another line, I have an open bug a long time, for no shadows on Bionic Commando, good chance to look at what happens?? This may also related to the shadows map problem in Crysis! ;D
https://bugs.winehq.org/show_bug.cgi?id=37525
Wine is the best solution to play and run programs win and it's open source. MAXIMUM MADNESS! XD
Thank you very much.
I'm giving what little I can to further improve the project.
All to the DX11!! Go! Go! Go! :D
PS: Attachment screenshot of FEAR Extraction Point.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #77 from David Gámiz Jiménez david.gamiz@gmail.com --- Created attachment 51846 --> https://bugs.winehq.org/attachment.cgi?id=51846 Screenshot FEAR 1 E.P. + patch "wined3d: Try to detect the polygon offset scale value"
FEAR 1 Extraction Point with Stefan patch "wined3d: Try to detect the polygon offset scale value" applied.
https://bugs.winehq.org/show_bug.cgi?id=27145
David Gámiz Jiménez david.gamiz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #51846|Screenshot FEAR 1 E.P. + |Screenshot FEAR 1 E.P. + description|patch "wined3d: Try to |wine 1.747 git 12/07/2015 |detect the polygon offset |patch "wined3d: Try to |scale value" |detect the polygon offset | |scale value"
https://bugs.winehq.org/show_bug.cgi?id=27145
David Gámiz Jiménez david.gamiz@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #51846|Screenshot FEAR 1 E.P. + |Screenshot FEAR 1 E.P. + description|wine 1.747 git 12/07/2015 |wine 1.7.47 git 12/07/2015 |patch "wined3d: Try to |patch "wined3d: Try to |detect the polygon offset |detect the polygon offset |scale value" |scale value"
https://bugs.winehq.org/show_bug.cgi?id=27145
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |34d8b987c493544f640bf5ca0a5 | |a6cbb3d3f4e7b Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #78 from Stefan Dösinger stefan@codeweavers.com --- Should be fixed by 34d8b987c493544f640bf5ca0a5a6cbb3d3f4e7b. Please retest with current Wine git.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #79 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Stefan Dösinger from comment #78)
Should be fixed by 34d8b987c493544f640bf5ca0a5a6cbb3d3f4e7b. Please retest with current Wine git.
Hi Stefan,
I try this weekend and tell you.
For now I can say that F.E.A.R. 1 and expansions OK. Right now I jugnado to the F.E.A.R.2 and all OK.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #80 from Wylda wylda@volny.cz --- (In reply to Stefan Dösinger from comment #78)
Should be fixed by 34d8b987c493544f640bf5ca0a5a6cbb3d3f4e7b. Please retest with current Wine git.
Yes, works for me too: * wine-1.7.48-74-gb3fe96a * GeForce GTX 970 v352.21
Unfortunately helicopter's blades are still missing (as mentioned in Comment 75). Right now, i'm still not able to go back to wine-1.3.18 to check, whether it's same regression.
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #81 from David Gámiz Jiménez david.gamiz@gmail.com --- (In reply to Wylda from comment #80)
(In reply to Stefan Dösinger from comment #78)
Should be fixed by 34d8b987c493544f640bf5ca0a5a6cbb3d3f4e7b. Please retest with current Wine git.
Yes, works for me too:
- wine-1.7.48-74-gb3fe96a
- GeForce GTX 970 v352.21
Unfortunately helicopter's blades are still missing (as mentioned in Comment 75). Right now, i'm still not able to go back to wine-1.3.18 to check, whether it's same regression.
For me works correctly also Stefan.
Version: wine-1.7.48-74-gb3fe96a / 32bit Bootle OS: Ubuntu 14.04 64bit GPU: GeForce GTX 560 Ti 1GB RAM driver version: 346.72 Checked in F.E.A.R.2 steam version
The issue of the blades, as I said, in my case are seen well. I do not understand what is wrong with you system Wylda. I try to make a screenshot that moment when I can.
Stefan, definitely, great job. :)
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #82 from Wylda wylda@volny.cz --- (In reply to David Gámiz Jiménez from comment #81)
... what is wrong with you system Wylda.
It can be unrelated to this bug, so I won't attach the screenshot here, but rather elsewhere.
https://www.dropbox.com/s/rgk86wzsjarochc/fear_helicopters_blades.png?dl=0
https://bugs.winehq.org/show_bug.cgi?id=27145
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xvachon@gmail.com
--- Comment #83 from Béla Gyebrószki gyebro69@gmail.com --- *** Bug 34569 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #84 from David Gámiz Jiménez david.gamiz@gmail.com --- Created attachment 51986 --> https://bugs.winehq.org/attachment.cgi?id=51986 Blades helicopter detail FEAR 1
@Wylda the blades in my system actually.
https://bugs.winehq.org/show_bug.cgi?id=27145
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #85 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.49.
https://bugs.winehq.org/show_bug.cgi?id=27145
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |levanchelidze@gmail.com
--- Comment #86 from Béla Gyebrószki gyebro69@gmail.com --- *** Bug 33569 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=27145
--- Comment #87 from Wylda wylda@volny.cz ---
...I do not understand what is wrong with you system Wylda.
Actually invisible Hellicopter's blades are FEAR's version 1.00 bug. It isn't shown even in Win8.1 64bit. Upgrading F.E.A.R. to version 1.08 makes it visible under wine-1.8rc1.