Jump to content
  • Advertisement
Sign in to follow this  
Ed Welch

OpenGL How do you make DXT5 work with sRGB

Recommended Posts

I am trying to use DXT5 compressed format. I load this with GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, but I can't find any option for sRGB. (for instance, non-compressed textures use GL_SRGB8_ALPHA8)

Share this post


Link to post
Share on other sites
Advertisement
17 hours ago, Ed Welch said:

Thanks for the answer. I looked into that. Is it not actually EXT_texture_compression_s3tc_srgb?

Edit: maybe that's for OpenGL ES. Very confusing

Look at issue 9:

Quote

9) Should S3TC compressed sRGB formats be supported?

RESOLVED:  Yes, but only if EXT_texture_compression_s3tc is also
advertised.  For competitive reasons, we expect OpenGL will need
an S3TC-based block compression format for sRGB data.

Rather than expose a separate "sRGB_compression" extension,
it makes more sense to specify a dependency between
EXT_texture_compression_s3tc and this extension such that when
BOTH extensions are exposed, the GL_COMPRESSED_SRGB*_S3TC_DXT*_EXT
tokens are accepted.

So if you have both EXT_texture_sRGB and EXT_texture_compression_s3tc you should have support for compressed sRGB textures. Looking in glext.h it looks like GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT is the one you want.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!