PDA

View Full Version : Serious light error on nVidia and AIT??!!!



NecroDOME
13-02-2007, 09:21 AM
Hi, I need some serious help (or tip)

Well, I figured out our engine was using SOFTWARE_VERTEX_PROCESSING (doh, how could it be posible) so I changed it to HARDWARE_VERTEX_PROCESSING. Now i'v got an error in the DirectX 9 lights (fixed function pipeline). They work on both ATI and nVidia, but the results are different!

This will lighten objects dynamically on nVidia cards but shows NO result on ati cards!!! everything is black :(


Lights[i].Attenuation0 := 0.5;
Lights[i].Attenuation1 := 1;
Lights[i].Attenuation2 := 0.2;


However when I change the Lights[i].Attenuation0 to 1 it works fine with ati cards... Strange problem...


Lights[i].Attenuation0 := 1;
Lights[i].Attenuation1 := 0;
Lights[i].Attenuation2 := 0;
However this light looks better on nVidia cards. on ati cards it's overbright (alsmost only white lights, on nVidia its colored)

What can I do about it? Need help... :(

ps. don't ask why it was on software vertex processing...
ps2. it all worked well in software vertex processing...

Clootie
13-02-2007, 12:31 PM
Weel, you could try different drivers for ATI cards, but really nothing will help you here. You have not stated what ATI card exposes this bug, but starting from Radeon9700 (R300) they do HW TnL via VertexShader units by executing highly optimized shaders. So, IMHO it's possible to fix in drivers, but you should submit bug report to ATI.

NecroDOME
13-02-2007, 01:15 PM
Well, in that case I'm better off implementing shaders myself I think... I can sent a bugreport, but all people who run my game still need to upgrade their drivers.

For now I think I just code a ATI-fix, just set attinuation to some "hardcoded" values and let the user choose to enable the "ATI light bug"

Mirage
13-02-2007, 02:36 PM
NecroDOME May be turning on D3DRS_NORMALIZENORMALS will help?

chronozphere
13-02-2007, 06:12 PM
Don't know whether it's relevant but you should aways install the DX runtime debugger and check the output. You might find some usefull information. :)

I realy hope you can solve this. I realy hate this kind of bugs, because its totally out of your hands and its very frustrating when you spend hours/days/months building something wich appears to be unstable because someone else made a mistake. :(

Good luck with this ;)

LP
13-02-2007, 06:38 PM
NecroDOME, from what I've found, NVidia cards/drivers are more fool-tolerant (that is, they work even with one or two broken parameters), while ATI are more wired to the specification. This way, when you develop on an Nvidia card, everything looks fine and then the output is broken when you try the app on ATI card.

I had similar problem with pixel-addressing: Nvidia GeForce 6600 GT seemed to have good precision when selecting pixels from textures while ATI X1600 was choosing wrong pixels (not related to mapping textels to pixels).

There is nothing to be done in this case, the only "help" is to use Direct3D debug versions, as others stated, although these versions don't help in all cases.

NecroDOME
16-02-2007, 08:59 AM
D3DRS_NORMALIZENORMALS is on...

I'll try to install the DX debugger...