Archived

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

Lighting troubles

This topic is 5502 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 light an object, and having a hell of a time doing it properly. I set up a general vertex format to support position, diffuse, normals, specular and textures, and assigned it to a bunch of vertices. I enabled Z-buffers and lighting, and set a current material rendering... but it seems that the diffuse component of the vertices overrides the current material state! Is this supposed to happen? I''m kinda new to DirectX, and still learning the ropes. Someone please enlighten me -Riskbreaker

Share this post


Link to post
Share on other sites
Either you choose to use diffuse vertices or you choose to use materials. They do not work together, that''s what I learned anyhow..

I can''t get hte lighting to fade smoothly with materials but it works with the vertex coloring, so!

/Sandman

Share this post


Link to post
Share on other sites
Thanks for the tips, guys... they were very helpful. I would have never of found that enumeration! Seems like D3D''s pretty sensitive to the color values... I had the rgb''s set to .1 for the materials and the lights, and everything was still coming out completely white. I had to set them down quite a bit further to make the rendering appear reasonably. Come to think of it, maybe it was just coming out that way since my objects were really close to my light source...

Share this post


Link to post
Share on other sites