0
\$\begingroup\$

What is the difference?

As far as i know, compressed textures would speed things up, because the PCIe bus has to transfer less amount of data, and the interconnect is the main latency issue with GPU's. For this i'm certain.

What i'm not sure of, and this is what i mainly want an answer to is, does the GPU decompress the textures on the fly, or does it display the uncompressed textures? In other words, is there any visual impact of using the compressed textures? The GPU decompresses them automatically? Does this vary with the compression algorithm used, or is it a GPU specific thing?

Thanks in advance.

\$\endgroup\$
  • 1
    \$\begingroup\$ Possible duplicate of How does GPU handle texture and VRAM? \$\endgroup\$ – DMGregory Aug 10 '17 at 2:44
  • \$\begingroup\$ It is not a duplicate to that question. \$\endgroup\$ – Nikos Aug 10 '17 at 3:46
  • \$\begingroup\$ That's what our voting system exists to sort out. If it doesn't get 5 duplicate votes, it will stay open, and the link will remain in the comments for users seeking related information. \$\endgroup\$ – DMGregory Aug 10 '17 at 16:38
  • \$\begingroup\$ I'd be cautious about closing this one because the other question and it's answers don't cover the visual impact part. If anything this question provides a more useful & comprehensive overview. \$\endgroup\$ – Maximus Minimus Aug 10 '17 at 19:30
3
\$\begingroup\$

All GPU texture compressions are lossy. There is a slight degradation in image quality that may or may not be noticeable depending on what is in the texture.

The compressed textures are stored compressed in memory (both CPU and GPU memory) and decompressed on the fly during texture lookups. This reduces both the memory requirement on the GPU and increases texel lookup rate by reducing memory bandwidth requirement.

Depending on the GPU it can also increase texture cache efficiency as less cache is used per texel when the texture is held compressed into the GPU texture (and/or unified) cache.

The entire texture does not get decompressed to RAM when used. It remains compressed in memory. The GPU reads the compressed texture itself (through its texture samplers).

In practice the impact on the PCIe (or other) bus is minimal as textures are rarely transfered between CPU memory and GPU memory. It's on the GPU's RAM bus during texture lookups that the big difference happens. This also applies to unified memory integrated GPUs.

In some cases when the hardware does not support the compression the texture will be converted by the driver (CPU) to either another compressed format or uncompressed. In other cases the texture won't be supported at all but generally game engines take care of this for you.

\$\endgroup\$
  • \$\begingroup\$ Ah. So there is a visual impact due to to the lossy compression. The answer provided all the information. Thanks. \$\endgroup\$ – Nikos Aug 10 '17 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.