Thanks for the test. I've had a similar one in my queue for a long time but never got around to finishing it, mostly because I couldn't understand the results I got.
On Wed, May 15, 2019 at 5:10 PM Paul Gofman gofmanp@gmail.com wrote:
- /* Use of D3DLIGHT2 instead of D3DLIGHT is intentional. Using D3DLIGHT
without dwFlags looks broken on Windows 7: directional light behaves
as if _LOCALVIEWER state is on, specular lights do not work at all and
always output zero colors. */
Oh, interesting. BTW, did you actually mean "specular lights" here or something else? FWIW it looks like I used D3DLIGHT and somehow got a fully white quad out of the directional light instead. Not sure where I tested it but it was most likely Windows 7 Nvidia. Still, it might explain at least some of the weird results I got.
Actually, let me attach my patch. In particular, see the large comment block in there. I don't know how much of that is actually true and how that's affected by D3DLIGHT vs D3DLIGHT2.