Sign in to follow this  
brekehan

D3D10 Lighting

Recommended Posts

I am confused. The only place I see lighting mentioned on MSDN for DX10 is in the lighting tutorial. It doesn't tell you much. Correct me where I am wrong. I assumed the "technique" with its associated shaders would correspond to a particular object you were rendering or a mesh subset. That you would set the technique to use as you were rendering the different parts or for each common part of the scene. As such, the pixel shader could very well be specific to a particular object. However, going through the lighting tutorial, it appears as if all lighting is done in the pixel shader. So is lighting supposed to be implemented as part of each individual object you are rendering? i.e Does my smurf mesh have his own lighting code, my house mesh have his own lighting code, my airplane have its own lighting code... OR is there a way to implement lights as objects themselves as I have been used to thinking. In a 3D modeler you make light objects, give them a direction, and then everything reflects those light objects. Also, the tutorial implements shaders that have a set number of lights, always on the scene and of a specific kind. How do you implement a system where the number of lights can change, kinds of lights can change, etc?? I mean, things should reflect differently when a red pen light is shown on it opposed to a white lamp light. I am very confused. So much that I have no idea where to start implementing lights in my project. Surely, everything is not going to always have two lambert type lights showing on them as in the tutorial. How would I even know the math to make other kinds? How do you right the shaders to accept any number of any kind of lights? etc. Please help.

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