0
\$\begingroup\$

I'm using a combination of sprite sheets for well, sprites and individual textures for infinite tiling.

For the tiling textures I'm obviously using Wrap to draw the entire surface in one call but up until now I've been making a seperate batch using Clamp for drawing sprites from the sprite sheets. The sprite sheets include a border (repeating the edge pixels of each sprite) and my code uses the correct source coordinates for sprites.

But since I'm never giving coordinates outside of the texture when drawing sprites (and indeed the border exists to prevent bleed over when filtering) it's struck me that I'd be better off just using Wrap so that I can combine everything into one batch.

I just want to be sure that I haven't overlooked something obvious. Is there any reason that Wrap would be harmful when used with a sprite sheet?

\$\endgroup\$
1
  • \$\begingroup\$ Maybe I misunderstood, but you can do whatever you like if you carefully craft a sprite sheet to make use UV wrapping. In general though using the GPU to wrap UV coordinates in a sprite sheet isn't common. \$\endgroup\$
    – RandyGaul
    Commented Jun 8, 2014 at 0:38

1 Answer 1

1
\$\begingroup\$

If you never sample outside of 0 .. 1.0 range, then it does not really matter if you use wrap instead of clamp.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .