Jump to content
  • Advertisement
Sign in to follow this  

Problem with Ambient Lighting

This topic is 3087 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

Hey Everyone

I'm pretty new at spending time on DirectX so i worked my way through a tutorial and now i want to add some light to my scene.
The scene i want to create is a small camera sequence, with a camera being in the valley in the cubes and one light source cycling through the inner of the ring.
So at first i want to create a directional light to get light work in general.
But everything i do just does not work!
Maybe you can give me some hints!

Thats how the render works now in wireframe. When light is turned off all the cubes are totally white. So this is in wireframe that you can get the basic idea:

Thank you!

Here is the code:


[Edited by - pnx on July 4, 2010 4:57:57 PM]

Share this post

Link to post
Share on other sites
It doesn't appear you set the material (dev->SetMaterial(...)) anywhere.

FYI, if you don't change the light or material parameters, you only need to set them once. You don't need to set them for each render.

EDIT: you don't show your vertex structure so it must be assumed you've set the vertex normals correctly.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!