Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Does paletted texture out-dated for 3D hardware??

This thread is locked; no one can reply to it. rss feed Print
Does paletted texture out-dated for 3D hardware??
A NMC
Member #2,192
April 2002
avatar

It seen that newest 3D hardware doesn't support paletted texture anymore. GL_EXT_palette_texture is absence on ATI series and newest NV card. I am worry if this useful feature will be removed in the future.

Paletted texture, however, is valuable on fake 2D system. Paletted color effect can improve performance while it doesn't have to do per-pixel calculation.

Moreover, paletted texture can save a lot of texture memory. Having a single copy of indexed-color texture can produce a several sprite with difference color scheme.
Even there are frequent palette change, the performance won't have a significant reduction.

Without paletted-texture, we may need glPixelMap and glImageSubTex to update textures very often. This require 4 times of texture memory and result a huge performance loss.

I just can't see the reason why though graphic leave this feature out. Or they don't desire 2D gaming. (AS 3D game doesn't use pixel-art anymore.

Bob
Free Market Evangelist
September 2000
avatar

Quote:

It seen that newest 3D hardware doesn't support paletted texture anymore. GL_EXT_palette_texture is absence on ATI series and newest NV card.

ATI never supported paletted textures. They've been depricated for a while on NVidia hardware, and removed on recent hardware (it costs too much to support for something that's used so rarely). Most of it can emulated using fragment programs, using a 1D texture as the palette look-up, if you really care about them.

--
- Bob
[ -- All my signature links are 404 -- ]

A NMC
Member #2,192
April 2002
avatar

Fragment program with 1D texture can emulate paletted texture. However, texture filter can be slow comparing to paletted_texture.

Furthermore, i can use same pieces of fragment program, for example distortion shader, apply on both non-paletted and paletted texture with paletted texture support. Otherwise, I have to write another version of fragment program which need to do one more texture sampling.

I may think, in recent 2D game, people try to avoid using paletted-texture because of concerning the up coming hardware. Even they used, they convert all texture to non-paletted and avoid paletted change. This become a trade off between programming for newest graphic card and old extension support.

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Moreover, paletted texture can save a lot of texture memory.

Are you going to use more than 64MB for textures? ;) Also both Direct3D and OpenGL have embedded texture managers which can upload and discard video textures while keeping their data in system memory as needed, so I don't think you have to care about video memory as long as you aren't going to use more than 64MB of it. :)

Quote:

Most of it can emulated using fragment programs, using a 1D texture as the palette look-up, if you really care about them.

But this would of course require using Direct3D with pixel shaders / getting a headache with vendor-specific OpenGL extensions / raising hardware requirements as high as GeForce FX / Radeon 9500. Also even bilinear filtering of paletted texture would make pixel shader quite complex.

Quote:

However, texture filter can be slow comparing to paletted_texture.

Just turn off texture filtering. GPU would have to look up correct color, anyway, so I don't think it would be great performance loss.

Quote:

Furthermore, i can use same pieces of fragment program, for example distortion shader, apply on both non-paletted and paletted texture with paletted texture support. Otherwise, I have to write another version of fragment program which need to do one more texture sampling.

Who said you have to write them? With CG/HLSL/GLSL you can just use some #ifdefs and generate all required shaders from just one source code. :)

Quote:

I may think, in recent 2D game, people try to avoid using paletted-texture because of concerning the up coming hardware.

I think they just moved to high-/true-color because of problems palettes caused, especially when more than artist was working on the graphics. This way artist has much more freedom when it comes to colors. Palettes were introduced mainly because of speed and memory limitations of older hardware, which limitations doesn't exist anymore. :)

Bob
Free Market Evangelist
September 2000
avatar

Quote:

But this would of course require using Direct3D with pixel shaders / getting a headache with vendor-specific OpenGL extensions / raising hardware requirements as high as GeForce FX / Radeon 9500.

OpenGL 1.4 + ARB extensions or OpenGL 2.0 would also do it. And GeForce 256 to GeForce FX all have paletted textures anyway.

Quote:

Also even bilinear filtering of paletted texture would make pixel shader quite complex.

Yes, that's the big downside. Having it emulated in the driver isn't all that much better though.

Paletted textures use a non-trivial amount of hardware, which does absolutely nothing 99% of the time. And since games had to have 2 code paths anyway because the competition doesn't implement paletted textures, it made a whole lot of sense to remove them: you don't break existing games, and you get to save a boatload of chip area which you can reuse to get more general performance.

--
- Bob
[ -- All my signature links are 404 -- ]

Go to: