Potentially stupid D3D question...
corncloseHi I have a (relatively) old game which allows the use of specular lighting by using a config file option. The game was originally design when DirectX 5 (maybe 6) was current. Now if I try to use specular by setting this in the game's config file, I get black objects and textures occassionally in the game, which the game's readme says is down to the way the graphics driver handles specular lighting. I have tried dozens of drivers with three different graphics cards and it's the same problem. I have tried to enable specular using a small VB program basically as follows :- D3DDevice.SetRenderState D3DRS_SPECULARENABLE, 1 Trouble is, this is not the device that the game uses. The default value for D3DRS_SPECULARENABLE is always 0, so I assume that the game does not switch it on by default, but simply assumes it is enabled as this was the case in older versions of DirectX (i'm using 8.1 now BTW). Is there any way I can globally enable specular highlights (ie. so that D3DRS_SPECULARENABLE is 1 by default). This may fix the game problem. Thanks
Eric ColemanHi, It seems like the attenuation values aren't set correctly within the program, and if you don't have source, I don't think there is anything you could do to fix the problem. Also, using another program to enable specular lighting won't have any effect at all. Changing the settings of the "d3ddevice" is program specific, its not a global value that effects all games.
corncloseThanks for your reply Eric, It just confirms what I already thought. No, I don't have the source code and the game is fully patched anyway. Unless I'm prepared to spend weeks with a disassembler, I'm stuck. So I suspect I'm stuck..... Cheers!