How to disable texture compression

Started by
2 comments, last by RPTD 13 years, 12 months ago
Trying to locate a problem in my textures I stumbled across broken compression in the ATI drivers. I used for testing a texture with a linear gradient from black to white. If I make the gradient using GLSL directly the gradient on screen is perfect as it should be. Using the loaded texture (a PNG so lossless from disk) I get a black and white gradient which is anything else than usable. It's riddled with banding and compression artifacts. Close-up 4x magnified to better showing the problem This totally kills textures and especially normal maps. *** Is there a way (in OpenGL) to force a driver to not use compression for a given texture? ***

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Advertisement
Are you sure the driver is compressing the texture, and that you aren't uploading the texture incorrectly?

If a driver is really compressing textures by its own, there is no way do disable that from GL.
AFAIK OpenGL doesn't use compression if the specified internal texture format is one of the non-compressed ones:
Quote:from ARB_texture_compression
The ARB_texture_compression extension allows an uncompressed texture to be compressed on the fly through the glTexImage2D call by setting its <internalFormat> parameter accordingly. This can be done in one of two ways: use a generic compressed internal format from Table 1 or use an explicit internal format like one offered by the S3TC extension listed in Table 2.

So if you don't tell OpenGL to compress and have those artifacts nonetheless, then probably something other is wrong..?


EDIT: There is also a possibility to verify whether a texture is actually compressed:
Quote:from ARB_texture_compression
...make sure that the image has been properly compressed by checking the glGetTexLevelParameteriv with <pname> set to GL_TEXTURE_COMPRESSED_ARB. The returned <params> will be non-zero if the texture is effectively compressed.

No, the uploading should be correct. Read somewhere though once that the Linux ATI driver has problems in that it compresses automatically which can cause troubles.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

This topic is closed to new replies.

Advertisement