Archived

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

Randy187

Lit textures

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