Jump to content
  • Advertisement
Sign in to follow this  
brekehan

D3D10 Lighting

This topic is 3733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!