PDA

View Full Version : How to create and draw texture bigger than MAX_TEXTURE_SIZE?



hockeyman
12-06-2012, 06:13 AM
Is there any way to create and draw bigger texture than MAX_TEXTURE_SIZE to screen?

Aleksandar
12-06-2012, 07:42 AM
Is there any screen you can display a texture as large as MAX_TEXTURE_SIZE?
In other words, why do you need that? Even modest hardware with 512MB of RAM allows 8192x8192 textures. It is sufficient even for several HD screens connected together.

What do you actually want to achieve? Clipmaps can achieve unlimited level of details with the resolution a bit higher than a screen with dynamical updates of layers.

Aestivae
12-06-2012, 07:55 AM
MAX_TEXTURE_SIZE is hardware dependent, so it's not strictly possible to create and draw a single texture bigger than that (if only because the GPU can't handle it).

Of course, there are ways around that, depending on the purpose of the texture. The first thing to consider: do you really need a texture that big? Can you get by with a smaller texture/lower resolution? To my knowledge, many modern mobile devices support sizes up to 2048, and many (if not most) computers up to 8192. Given that the highest practical screen resolution is 1920 by 1200, you might not need a texture that large. (On a side note, a texture that is 8192x8192 RGBA 8-bit depth is 256 megabytes. Compare that to a high end dedicated graphics card's 2GB of RAM!)

If you decide you absolutely have to have that texture in its full size, you'll need to split it up. If the texture is UV mapped over a 3D model, map it over multiple textures; if you need to display some (2d) massive image for whatever reason, use clipmaps like Aleksandar suggested.