PDA

View Full Version : Library for BPTC



Manuelito
02-10-2011, 06:10 AM
Hey folks,

I want to compress my textures with BPTC(BC7) but I can't find any extension for OpenGL to do this.
I need something like squish for BPTC.
Can you help me?

Thanks,
Manuelito

Alfonse Reinheart
02-10-2011, 10:41 AM
I want to compress my textures with BPTC(BC7) but I can't find any extension for OpenGL to do this.

Is there some reason you can't use the same tools that you would use to compress textures for D3D? It's not like those tools depend on D3D or something. Any tool that can generate BC7 can be used with OpenGL just as well as D3D.

Groovounet
02-10-2011, 10:48 AM
There is basically (still) no tool for BC7 and BC6H...

The only thing I found is a code sample in the D3D11 but this samples live on the do it yourself principle.

Zenja
06-14-2012, 06:39 PM
There is basically (still) no tool for BC7 and BC6H...

The only thing I found is a code sample in the D3D11 but this samples live on the do it yourself principle.

nVidia texture tools have a TGA->BC7 encoder (http://code.google.com/p/nvidia-texture-tools/downloads/detail?name=bc7_export.zip&can=2&q=)
It is very slow. A single 1920x1080 image takes around 70 minutes to encode on my development PC (3Ghz i7CPU). The tool is command line only. We have an internal tool to encode, then wrap the output of this tool into a .BC7 wrapper (applies a header with width/height/signature).

The quality of the tool is excellent. Our BC7 encoded images look fantastic (compared to original PNG). Much better than our old DX5/BC3/S3TC/PVR compressed images.

menzel
06-15-2012, 02:59 AM
BC7 and BC6H are supported by OpenGL with the ARB_texture_compression_BPTC extension which went core in 4.2. The internal texture formats are:
GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, GL_COMPRESSED_RGBA_BPTC_UNORM_ARB and GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB.

The driver must be able to compress the textures on the fly, which works ok for the old DXT formats but will probably be very slow (and/or very bad) for the more complex BC7/BC6H formats. Offline compressors for DX should also work on OGL as the format is exactly the same!