Jump to content
  • Advertisement

Archived

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

Randy187

Lit textures

This topic is 5560 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, I want to use realtime lit textures poly''s for my DirectX 9 program, but i dont know how to implement this. I searched the internet but not found anything usefull. I want to lit the textures with the standard DirectX lighting engine and use 1 texture per model max. How do you implement this?

Share this post


Link to post
Share on other sites
Advertisement
set up each vertex that you want lit to have the correct normal, and make sure it has D3DFVF_DIFFUSE specified. then set up D3DLIGHT8/9s in the world, and enable the lighting render state (D3DRS_LIGHTING). you aren''t really lighting textures, just the vertices and the colors get interpolated across the triangle which has the texture on it.

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.

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!