Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Quick Light question

This topic is 6020 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''m trying to figure out how to get my lights working right. I''m fairly sure it has something to do with the attenuation of my light but not quite sure. The light seems "late" to me. I have a cube spinning around, and it takes about a half of a second before the light actually shows up on the faces. So, even though its in direct way of the light, it is dark for about half a second. Here''s my light setup, it might even have nothing to do with this, but I''d like some help:
	light.Type=D3DLIGHT_POINT; //a point light, no direction

	light.Diffuse.r=1.0f; //set the Diffuse color to full white





Share this post

Link to post
Share on other sites
Do you only have eight vertices in your cube? Remember that lighting is done per-vertex, meaning if you have a big quad and light right in its center, the quad will be black because light is far from its vertices.

Share this post

Link to post
Share on other sites
I think I understand what you are asking me. My cube isn''t as big as you think it is if I get you right. the cube is really small and the light is about 50 units away from it.

Share this post

Link to post
Share on other sites
Ok, I think the problem is that only one side of the cube can be lit at one time. Thats what appears to be the problem. WHY in the world would it be like that?

Share this post

Link to post
Share on other sites

  • 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!