Sprite sheets, Clamp or Wrap?

Posted by David on Game Development See other posts from Game Development or by David
Published on 2014-06-07T13:02:27Z Indexed on 2014/06/07 15:41 UTC
Read the original article Hit count: 403

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?

© Game Development or respective owner

Related posts about xna-4.0

Related posts about spritesheet