[PATCH 08/11] ddraw/tests: Backport test_specular_lighting() for ddraw1.

Paul Gofman gofmanp at gmail.com
Thu May 16 14:43:33 CDT 2019


On 5/16/19 22:28, Matteo Bruni wrote:
>
> 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.

Sorry, that's typo, actually 2 of them :(. First of all I meant point 
and spot lights, not "specular". I was getting zeroes when using them 
whatever I tried, I tried a lot of states and coordinate tweaking. It 
was not a background color, it did draw the triangles.

Regarding directional light, I was getting fully white too initially 
when I was using the test values from ddraw2+ tests. But later after 
tweaking some values (setting color values to 0.1 instead of 1.0) I 
found that it actually can output something else, and I matched that 
something else to the lighting computation with _LOCALVIEWER set to 
*off* (not "on" as my buggy comment). I initially suspected that ddraw1 
assumes _LOCALVIEWER should be off, but later testing with point lights 
and using D3DLIGHT2 structure made directional lights in a supposed way, 
same as ddraw2.

Now I suppose that it is likely some bug in Windows ddraw1, e. g. maybe 
it is using the flags which are not in D3DLIGHT and gets mad from some 
random values (e. g., there is a documented flag not to set specular 
lighting with the light, or not to enable it at all).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190516/2e682fa8/attachment.html>


More information about the wine-devel mailing list