Looking for lighting and shadow which used in DX games..

Started by
3 comments, last by DickieChen 13 years, 5 months ago
Hi everyone,
free image hosting
I'm looking for a better method for computing lighting and shadow,I just used D3DLIGHT9 for the lighting,and ShadowVolume for computing shadow.Although the scene had a good effect,but it rendered very slowly,and it seems that it cannot be used to program games,and this makes me wonder.
free image hosting
In fact,I found those DX games have a very general lighting and shadow method,but it seems that it isn't D3DLIGHT9 and ShadowVolume..
and who can tell me how to create lighting and shadow in a DX game? I mean it's fast,and it has a good effect..just like the one in the picture...
thanks a lot.
Advertisement
Well,the question is like this,I don't know what's the 'proper' method to create lighting and shadow in a DX game,and whether my D3DLIGHT9 and ShadowVolume is 'proper' in a game...
In my opinion would be to use shaders (HLSL) :)
http://mateusvitali.wordpress.com/
Have a look into shadow mapping (there are verious algorithms, each with their pros and cons).
But yes, you really shouldn't be using the fixed function pipeline anymore (Which D3DLIGHT9 is an interface to.) and should be using a shading language (such as HLSL or Cg in your case).
Good advice...Now I am working with PixelShader..hope this will work.thanks to VitaliBR and diablos_blade

This topic is closed to new replies.

Advertisement