Sign in to follow this  
colt527

Some Lighting Questions

Recommended Posts

colt527    130
Ok, I have been stuck on the issue of lighting for quite some time and its been holding up all of my projects. I just can't decide what to use, so I have some questions that maybe someone of you can help me with so I can better decide which path to take. I really do not want to use any form of vertex lighting. I originally implemented the Fixed function D3D lights and VS lighting and was not pleased with the results at all. Ideally I want to do per-pixel lighting, at this point I dont really care how. I have 3dsmax7 so I can use those light maps but what is the best way to apply them to the models after I render to texture? I see that 3DS does it in the viewport and if I could just mimic that it would be fine. I also tried Dot3 bump mapping, but I only found information on using that with direction lights and I need point lights as well. Does anyone have some links to good tutorials for per-pixel lighting with Pixel Shaders or anything like that? Thanks in advance for taking the time to read my post.

Share this post


Link to post
Share on other sites
matches81    474
I can only give you hand with that dot3-bumpmapping with point lights:
to get the direction vector of the light you simply subtract the point lights origin from your current point so:
LightDir = LightOrigin - CurrPos
should be enough... the rest should be the same as for directional lights.

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