[Bug 37838] New: Chessmaster X: Absent chess piece lighting with Direct3D
https://bugs.winehq.org/show_bug.cgi?id=37838 Bug ID: 37838 Summary: Chessmaster X: Absent chess piece lighting with Direct3D Product: Wine Version: 1.7.33 Hardware: x86 URL: https://archive.org/download/Chessmaster10thEditionDem o/Chessmaster10thEditionDemo.exe OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: multitude(a)internode.on.net Distribution: --- Chessmaster 10 (and Chessmaster 11 Grandmaster Edition) do not light chess pieces correctly. This is most noticable for wooden chess sets (the default). 1. Install the Chessmaster 10 demo from the URL (you may need to be in a 32-bit WINE environment for the installation to work). 2. Run the configuration program 'cmsettings.exe'. 3. Select 'OpenGL (Low Performance Video Cards)' and save. 4. Run 'game.exe'. 5. Once you've created a user, select the icon left of the rotating chess board and then select the 'Training Mode' icon. RESULT: When the chess board is displayed, the pieces are correctly lit (see OpenGL attachment). 6. Close the Chessmaster demo and re-run 'cmsettings.exe', this time selecting 'Direct3D (Full Effects)', and save. 7. Re-run 'game.exe' and go to the same 'Training Mode'. RESULT: The chess pieces do not have any lighting on them (see Direct3D attachment). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #1 from multitude <multitude(a)internode.on.net> --- Created attachment 50392 --> https://bugs.winehq.org/attachment.cgi?id=50392 Chessmaster X with Direct3D -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #2 from multitude <multitude(a)internode.on.net> --- Created attachment 50393 --> https://bugs.winehq.org/attachment.cgi?id=50393 Chessmaster X with OpenGL -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 multitude <multitude(a)internode.on.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Chessmaster X: Absent chess |Chessmaster 10/11: Absent |piece lighting with |chess piece lighting with |Direct3D |Direct3D -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #3 from multitude <multitude(a)internode.on.net> --- Created attachment 51137 --> https://bugs.winehq.org/attachment.cgi?id=51137 Chessmaster X demo with Direct3D on OpenGL 3.0+ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #4 from multitude <multitude(a)internode.on.net> --- As of Wine v1.7.38, Chessmaster crashes when attempting to use the Direct3D to OpenGL wrapper with OpenGL 2.1. See https://bugs.winehq.org/show_bug.cgi?id=38264 Using OpenGL 3.0 (and up to 4.4), the chess pieces do get lit. See attachment 'Chessmaster X demo with Direct3D on OpenGL 3.0+'. However, as illustrated in the attachment, the lighting direction appears completely random. It's most notable with piece shadows being behind the piece, but the front of the piece in complete darkness. The third black pawn from the right is an example of the lighting direction being close to correct. The black pawn on the very right is an example of the lighting direction being dead wrong. cheers, multitude -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |matteo.mystral(a)gmail.com Ever confirmed|0 |1 --- Comment #5 from Matteo Bruni <matteo.mystral(a)gmail.com> --- This should now be fixed by 7a8ac888de232578dd36f799cf203e5a59fe5b70, right? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #6 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Matteo Bruni from comment #5)
This should now be fixed by 7a8ac888de232578dd36f799cf203e5a59fe5b70, right?
Replying to myself, no, that commit only fixes the regression caused by 9811d85141610f903d6c8de3b00be6c853ece182 (i.e. bug 38256). I think what you mean with "absent lighting" is the missing specular highlights in D3D mode. I can reproduce that part, the highlights are there on Windows for me. I'll take a look. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #7 from Matteo Bruni <matteo.mystral(a)gmail.com> --- Created attachment 51224 --> https://bugs.winehq.org/attachment.cgi?id=51224 Specular highlights fix I'm attaching a fix for the specular highlights. Does the game look fine to you with the patch? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #8 from Henri Verbeet <hverbeet(a)gmail.com> --- (In reply to Matteo Bruni from comment #7)
The viewer is in the (0.0, 0.0, -1.0) direction in the D3D coordinate system.
It's been a while since I went through the math for this, and the lighting code in general, but does that imply it's wrong for the other light types as well? Fortunately we have about 0 tests for D3DRS_LOCALVIEWER in any D3D version.
/* TODO: In the non-local viewer case the halfvector is constant and * could be precomputed and stored in a uniform. */ If we're going to redo how light parameters are passed to the shader, we should probably start from the actual D3D parameters. Spot lights in particular are just different between D3D and GL.
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #9 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Henri Verbeet from comment #8)
(In reply to Matteo Bruni from comment #7)
The viewer is in the (0.0, 0.0, -1.0) direction in the D3D coordinate system.
It's been a while since I went through the math for this, and the lighting code in general, but does that imply it's wrong for the other light types as well? Fortunately we have about 0 tests for D3DRS_LOCALVIEWER in any D3D version.
Yes, the others are probably wrong too. I can try to write a test for specular + D3DRS_LOCALVIEWER although I'm a bit worried that pow() + older GPUs = terrible numerical accuracy. Hopefully that won't be a showstopper.
/* TODO: In the non-local viewer case the halfvector is constant and * could be precomputed and stored in a uniform. */ If we're going to redo how light parameters are passed to the shader, we should probably start from the actual D3D parameters. Spot lights in particular are just different between D3D and GL.
I'm still using GL-like parameters in my patches for getting rid of builtin uniforms in GLSL but yeah, ideally we should pass the D3D ones. I had a quick look into that when I was working on those various ddraw lighting fixes and it seems like it would be a lot of churn in old and mostly untested code :/ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #10 from multitude <multitude(a)internode.on.net> --- Unfortunately the patch doesn't appear to work. Applied to 'wine-1.7.40' the piece lighting remains absent, as per https://bugs.winehq.org/show_bug.cgi?id=38358 Applied to 'wine-1.7.39' there may be a change to the lighting direction, but it's not apparent as the direction is still random. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 --- Comment #11 from multitude <multitude(a)internode.on.net> --- Apologies Matteo. The patch does work, fixing absent lighting, and the lighting direction from bug 38358. I don't know why it didn't work the first time, but anyway... As requested, I'll attach screenshot examples to bug 38358 for reference. Thanks for your efforts. cheers, multitude -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Henri Verbeet <hverbeet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-d3d -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 multitude <multitude(a)internode.on.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #12 from multitude <multitude(a)internode.on.net> --- Confirmed specular hightlights fixed in Wine v1.7.42. Outstanding. cheers, multitude -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.43. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d6db6c729532f5f9320db1d376e | |f034342450a84 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=38358 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=37838 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Chessmaster 10/11: Absent |Chessmaster 10/11: Missing |chess piece lighting with |specular highlights on |Direct3D |chess pieces with Direct3D -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org