Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: EXT_texture_compression_latc - Compressing

  1. #1
    Intern Contributor
    Join Date
    May 2008
    Location
    USA
    Posts
    96

    EXT_texture_compression_latc - Compressing

    I can't tell from the spec - if I pass in an 8-bit luminance texture, and request this as the internal format, will the driver compress it for me?

    And would it do it quickly, i.e. hardware, or slowly as it transfers?

    I suppose I'd also like to use it as a PBO and render to it, if that's possible? The goal is to apply some mild compression to 4:2:0 video textures.

    Bruce

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,728

    Re: EXT_texture_compression_latc - Compressing

    And would it do it quickly, i.e. hardware, or slowly as it transfers?
    Slowly. Unless you don't care about upload performance (or have no other choice), never tell the driver to compress a texture. Do it offline yourself.

    I suppose I'd also like to use it as a PBO and render to it, if that's possible?
    You cannot render to compressed texture formats.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,882

    Re: EXT_texture_compression_latc - Compressing

    Quote Originally Posted by Alfonse Reinheart
    I suppose I'd also like to use it as a PBO and render to it, if that's possible?
    You cannot render to compressed texture formats.
    I remember Jan Paul and Ignacio doing something like that here: Real-Time YCoCg-DXT Compression

    See the paper for details, but the relevent snippet:

    DXT Compression on the GPU: ... It is currently not possible to write the results to a DXT-compressed texture directly, but the results can be written to an integer texture...Once the compressed DXT blocks are stored to the texels of an integer texture they need to be copied to the compressed texture. This copy cannot be performed directly. However, an intermediate pixel buffer object (PBO) can be used by copying the contents of the integer texture into the PBO, and then copynig from the PBO to the compressed texture.

  4. #4
    Intern Contributor
    Join Date
    May 2008
    Location
    USA
    Posts
    96

    Re: EXT_texture_compression_latc - Compressing

    Oh, I have been reading those docs, but I missed that, thanks. The key seems to be that they're doing the calculations in a shader (I don't have the LATC algorithms right now) and then moving it around. In the compression case, I would just pull it back to the CPU then go to the network or disk. On playback, I would push the pre-compressed textures into PBOs then use them.

    It is the same idea as all the DXT tricks, but just a 2:1 compression and on separate planes, so I get the benefit with 4:2:0 streams. The DXT methods get better compression but at 4:4:4 only, so you get 4:1 or 8:1 quality but with only a 2:1 or 4:1 compression.

    Bruce

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •