Jump to content
  • Advertisement
Sign in to follow this  

Lights and materials

This topic is 3645 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 have light set like this:
light.Type = LightType.Point;
light.Range = 10000;
light.Diffuse = Color.White;

and material set like this:
surfaceMaterial = new Material();
surfaceMaterial.Ambient = Color.DarkGray;
surfaceMaterial.Specular = Color.White;
surfaceMaterial.Diffuse = Color.Brown;

And this material with this light renders white :( I tried plaing with DiffuseColor of material and light and only managed to render colors like Yellow,Red,Green,Blue. Everything else renders as white. Why ??

Share this post

Link to post
Share on other sites
Make sure you zero out the materials structure. There is an emissive coomponent which might be overriding your other values. I sort of doubt this though.

Make sure you have lighting enabled...
SetRenderState(LIGHTING, TRUE);

And also make sure what you're lighting has vertex normals.

Good luck.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!