Jump to content
  • Advertisement


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


Cubic environment mapping

This topic is 5334 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 have a little problem here with my rendering in Direct 3d I''m working on a pool type game, and what i am trying to do is have a 2D texture mapped onto the pool balls for their color and number. And then also i have a cubic map texture so you can see a reflection in the pool balls. My problem is that in order to map the 2D texture first with the numbers, i need to have the texture wrap round at the edges otherwise the texture looks screwed up at the texture boundaries. So i use the following line: pD3DDevice->SetRenderState(D3DRS_WRAP0, D3DWRAPCOORD_0|D3DWRAPCOORD_1); from what i understand, this sets it so that the first texture will be wrapped but it shouldn''t affect my cubic map right? wrong . when i add the line above it screws up my cubic map at certain points, its hard to explain but i could show some screens if necessary. I think it has to do with this line also: pD3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, TexCoordIndex); I need this to make the reflections look real, but when i switch it off the texture renders ok. Any ideas? i''ve been trying things for ages and i can''t seem to find anything that works...

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!