Jump to content
  • Advertisement
Sign in to follow this  
godsenddeath

problem with textures + lighting

This topic is 3850 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 had a mini 3D world, 2 textured boxes, and a floor. but when i finished implementing the lighting and materials, i finally got the lights to work, but now the textures don't show. i'm wondering if it has anything to do with the order i set my FVF in , it goes XYZ|texture|normal and i'm wondering if the normal should go before the texture? if anyone has any idea if this is the problem, or on any other solutions, it'd help alot, thanks.

Share this post


Link to post
Share on other sites
Advertisement
"order i set my FVF in , it goes XYZ|texture|normal "

Have you set your vertx struct data in the same order as your FVF?
eg. for that FVF i think you would have something like:

struct Vertex
{
float x, y, z;//cooords
float u, v; // tex coords
float nx, ny, nz; //normals
}

PS: plz correct me if im wrong.

Share this post


Link to post
Share on other sites
No. Bitwise OR is independant of order. A | B is exactly the same as B | A.

However, vertices declared with FVF's do have to be in a certain order. There's an image somewhere that showed the required order. It used to be in the DirectX SDK documentation, but I think they removed it for some reason.

Share this post


Link to post
Share on other sites
Using FVF, the normal should come before the texture. Using a vertex declaration you can use any order.

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.

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!