http://bugs.winehq.org/show_bug.cgi?id=29052
Bug #: 29052 Summary: Incorrect handling of lit vertices causes models to render black in The Longest Journey Product: Wine Version: 1.3.32 Platform: x86 URL: http://games.softpedia.com/get/Games-Demo/The-Longest- Journey-161-Demo.shtml OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-ddraw AssignedTo: wine-bugs@winehq.org ReportedBy: octavian.voicu@gmail.com Classification: Unclassified
Created attachment 37430 --> http://bugs.winehq.org/attachment.cgi?id=37430 Patch to fix issue with black rendered characters.
IDirect3DDevice2 and IDirect3DDevice3 handle lighting differently than IDirect3DDevice7. Specifically, vertices which have colors but no normals (like D3DVT_LVERTEX or D3DFVF_LVERTEX) should bypass lighting calculations in the older interfaces. Wine handles them like in IDirect3DDevice7, rendering them black.
This makes the models in the game The Longest Journey render black. I wrote a series of tests that I submitted to wine-patches, but they need a bit more refactoring to go in. Links to relevant patches from the series are below:
http://source.winehq.org/patches/data/80669 http://source.winehq.org/patches/data/80673 http://source.winehq.org/patches/data/80670
I'm attaching a patch that fixes these issues, but I need to get the tests in before submitting it. It also needs a bit more thought on how older interfaces should handle render states that were introduced in later version of Direct3D (like D3DRS_LIGHTING).
This patch only fixes the issue with the black rendered characters. There is another issue that makes characters only render partially, which is tracked in http://bugs.winehq.org/show_bug.cgi?id=11819.
http://bugs.winehq.org/show_bug.cgi?id=29052
Octavian Voicu octavian.voicu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, testcase See Also| |http://bugs.winehq.org/show | |_bug.cgi?id=11819, | |http://bugs.winehq.org/show | |_bug.cgi?id=28678
http://bugs.winehq.org/show_bug.cgi?id=29052
Octavian Voicu octavian.voicu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also|http://bugs.winehq.org/show | |_bug.cgi?id=11819, | |http://bugs.winehq.org/show | |_bug.cgi?id=28678 |
http://bugs.winehq.org/show_bug.cgi?id=29052
Octavian Voicu octavian.voicu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED AssignedTo|wine-bugs@winehq.org |octavian.voicu@gmail.com Ever Confirmed|0 |1
--- Comment #1 from Octavian Voicu octavian.voicu@gmail.com 2011-11-13 15:55:22 CST --- Stefan reports that it also affects menu of Pool of Radiance 1.4, see http://bugs.winehq.org/show_bug.cgi?id=10133.
http://bugs.winehq.org/show_bug.cgi?id=29052
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-ddraw |directx-d3d
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #2 from Chris psycho_driver@yahoo.com 2012-05-05 10:33:15 CDT --- Created attachment 40046 --> http://bugs.winehq.org/attachment.cgi?id=40046 Updated for 1.5.2
Testing Pool of Radiance 2 with patch adapted for 1.5.2. It seems to be working well.
http://bugs.winehq.org/show_bug.cgi?id=29052
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #3 from Wylda wylda@volny.cz 2012-05-07 18:35:14 CDT ---
Great job! I took the rebased patch and it applied cleanly to wine-1.5.3-188-gb80c71a and fixed the bug 22318. Thank you Octavian.
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #4 from Jerome Leclanche adys.wh@gmail.com 2012-05-08 06:32:24 CDT --- *** Bug 22318 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=29052
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Salz85@gmail.com
--- Comment #5 from Wylda wylda@volny.cz 2012-05-13 08:11:44 CDT --- *** Bug 22668 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=29052
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #6 from mr jingle Salz85@gmail.com 2012-05-14 10:04:02 CDT --- Sega Rally 2 is fixed on wine 1.5.4 / Mac Os X 10.7.4 built with this patch.
http://bugs.winehq.org/show_bug.cgi?id=29052
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #7 from Stefan Dösinger stefan@codeweavers.com 2012-12-04 15:17:58 CST --- Octavian, do you want to take another shot at getting the patches into Wine? If not I'll take a look at it, but I always like opportunities to recruit new contributors :-) .
http://bugs.winehq.org/show_bug.cgi?id=29052
sacrediou sacrediou@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sacrediou@yahoo.fr
http://bugs.winehq.org/show_bug.cgi?id=29052
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #8 from joaopa jeremielapuree@yahoo.fr 2013-06-08 20:43:52 CDT --- Any hope to see these patches included in Wine soon?
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #9 from Stefan Dösinger stefan@codeweavers.com 2013-06-15 17:12:58 CDT --- I'm looking into this for Wine 1.6.
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #10 from Octavian Voicu octavian.voicu@gmail.com 2013-06-15 19:35:25 CDT --- Sorry I haven't contributed anything in a long time. I do have notifications from this and a couple of other related bugs pinned to my inbox, but unfortunately I never seem to have time to get back to them.
Seems a bit too tricky for fixing during code freeze / so late in the release process (even if it's a bugfix).
http://bugs.winehq.org/show_bug.cgi?id=29052
--- Comment #11 from Stefan Dösinger stefan@codeweavers.com 2013-06-16 08:11:01 CDT --- The fix itself is fairly simple and isolated to the IDirect3DDevice2 and IDirect3DDevice3 interfaces. Writing comprehensive tests will take a day or two though. (I've Device2 done now, that needs porting to Device3 and Device7, and some additional tests in those versions to make sure that D3DFVF_RESERVED doesn't influence lighting)
http://bugs.winehq.org/show_bug.cgi?id=29052
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |c1663c55830f77d9648d8d06e93 | |6aaf6007bc6ca Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #12 from Stefan Dösinger stefan@codeweavers.com 2013-06-20 15:57:28 CDT --- Should be fixed by c1663c55830f77d9648d8d06e936aaf6007bc6ca.
http://bugs.winehq.org/show_bug.cgi?id=29052
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2013-06-21 13:32:49 CDT --- Closing bugs fixed in 1.6-rc3.
https://bugs.winehq.org/show_bug.cgi?id=29052
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|octavian.voicu@gmail.com |wine-bugs@winehq.org