Re: Tiling large bitmap, what size tile is best?
From: Eyal Teler (et_at_nospam-et3d.com)
Date: 11/21/04
- Next message: The March Hare [MVP]: "Re: Multiple shapes performance"
- Previous message: Tamir Khason: "Multiple shapes performance"
- In reply to: mikegi: "Tiling large bitmap, what size tile is best?"
- Next in thread: mikegi: "Re: Tiling large bitmap, what size tile is best?"
- Reply: mikegi: "Re: Tiling large bitmap, what size tile is best?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Nov 2004 22:56:12 +0200
Okay, let me see if I understand the problem:
You have to display an image as a background. This is a single image,
and it can be larger than 2048x2048, which is the commonly supported
maximum texture size. Presumably this background needs to be seen at
its actual resolution and scrolled -- otherwise you'd just load it
scaled down.
I don't understand why you're saying "Larger tiles would be less
memory efficient but faster." The fewer the textures, the less memory
overhead will be used, and if the tiles aren't fixed in size, then
you'll be able to fit the exact image, without waste. If you have,
say, a 3000x2500 image, then using four textures, on 2048x2048, one
952x2048, one 2048x452 and one 952x452 will cover your image.
Regarding cracks, the more tiles the more potential cracks there will
be. Although if you're drawing 1:1 without filtering, you should be
able to align the texture to the screen such that there are no cracks.
In general, I'd suggest just writing what is easiest for you to
implement, and only consider something more complicated if there's
actual evidence that performance is bad because of your implementation.
Eyal
mikegi wrote:
> I'm using a large background bitmap in my DX app. Users want the ability to
> add higher resolution bitmaps which will exceed the max texture size of most
> chips. So, I'll need to tile the background. Should I standardize on a fixed
> tile size, say 256x256 or 512x512, or use variable sizes tiles? It seems
> like fixed-size tiles would help prevent cracks at the boundaries. The
> advantage of smaller tiles is that they would use less texture memory but
> they would be slower because of more texture switching. Larger tiles would
> be less memory efficient but faster.
>
> I'm looking for thoughts from those who've been there and fought with the
> details. What worked best in actual practice?
>
> Thanks,
> Mike
- Next message: The March Hare [MVP]: "Re: Multiple shapes performance"
- Previous message: Tamir Khason: "Multiple shapes performance"
- In reply to: mikegi: "Tiling large bitmap, what size tile is best?"
- Next in thread: mikegi: "Re: Tiling large bitmap, what size tile is best?"
- Reply: mikegi: "Re: Tiling large bitmap, what size tile is best?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|