https://bugs.winehq.org/show_bug.cgi?id=37838
--- Comment #8 from Henri Verbeet hverbeet@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.