Jump to content
  • Advertisement
Sign in to follow this  
brekehan

texture coords - want to clamp but can't

This topic is 3319 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 can see a bit of tearing every now and again in my background. I know when people do a skybox, they usually clamp the tex coords to eliminate tearing. My understanding of clamping is that the texture coords have to be between 0 and 1. Currently, my background is a sphere, split into 4 parts. Each part has 1 texture mapped to it. I did this because A) the game art I am using came that way and B) it provides more detail. The kicker is that these texture have been scaled * 3 in order to tile them. So, I don't think I can use a clamped addressing mode will work. What to do?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

Correct me if I understand wrong:
You have a sphere and a 6-face texture (maybe a cube texture) and you want to render your it like a sky-sphere?

If it's you want to do, I can give my sky-sphere render code.

Share this post


Link to post
Share on other sites
Quote:
Original post by programci_84
Hi,

Correct me if I understand wrong:
You have a sphere and a 6-face texture (maybe a cube texture) and you want to render your it like a sky-sphere?

If it's you want to do, I can give my sky-sphere render code.


Nah.
I have a sphere that is split into quarters.
The top hemisphere and lower, then split those into right and left.
Each quarter is textured with 1 texture.

The textureing is fine, I just can't clamp, because the texture is tiled 3 times on each quarter.

Share this post


Link to post
Share on other sites
If I understand you right, you could just clamp your texture coordinate from 0 to 3 in u direction and 0 to 1 in v direction... that should give you the texture three time repeated around each quarter of the sphere...

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!