Sign in to follow this  
Temjin

Alternatives to D3DLIGHT9 and vertex lighting?

Recommended Posts

Temjin    168
Although D3DLIGHT9 (point, directional..etc) is easy to use and indeed basically 'does what it says' I find the resulting light effect to be rather uninpressive and in some instaces a higher poly mesh isn't a option to achieve a better visual effect. Would someone be so kind as to quickly list the different forms of lighting avilable in DirectX? I know of per-pixel lighting, however I'm unable to find any DirectX samples specificaly for this and as such have no idea how to implement it or how to get it working with a scene using .X files(although I think I remember seeing a Microsoft sample demostrating the method with a jet model??? although I've been unable to find the sample again, and wounder now if I imagined it 0_o ) Many thanks in advance, Pete [Edited by - Temjin on July 4, 2005 1:28:46 PM]

Share this post


Link to post
Share on other sites
jollyjeffers    1570
You pretty much have to delve into the wonderful and exciting world of the programmable pipeline (vertex and pixel shaders) to get your better quality lighting.

However, you must appreciate that once you dig in here then you take responsibility for all of the implementation - which can get a bit hairy the more advanced a lighting function you choose.

Programming Vertex and Pixel Shaders by Wolfgang Engel is what I'm currently reading - it's got a LOT of information on both re-implementing the basic lighting model(s) and then extending them to some really cool stuff. Pick up a copy if you've got ~£20/$30 handy [smile]

Various tricks do exist with the fixed-function pipeline, but finding examples/documentation for them will be tricky - mostly because it's been superceded by bigger and badder shader-related algorithms [grin]

hth
Jack

Share this post


Link to post
Share on other sites
Saruman    4339
Quote:
Original post by jollyjeffers
Programming Vertex and Pixel Shaders by Wolfgang Engel is what I'm currently reading - it's got a LOT of information on both re-implementing the basic lighting model(s) and then extending them to some really cool stuff.

This book is the best resource around for learning to use the programmable pipeline imo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this