• Advertisement

Archived

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

Lit textures

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