BC7 RGB channels bleed into alpha channel

Hi!

I’ve found that BC7 compression causes RGB channels to bleed over into the alpha channel on some textures.

This becomes problematic for us since we are using alpha channel as emissive in some cases.

When debugging this I found that these combinations of texture settings fixes the problem:

Oodle 2.9.7 and above in combination with "Preserve Extremes When Compressing With Oodle=True" removes the noise in the alpha channel.

Tested on 5.5.1, 5.6.1, 5.7.0.

Attaching repo project and repo steps.

Steps to Reproduce

Tested on 5.5.1, 5.6.1, 5.7.0.

  1. Open Material: M_NewestOodle_PreserveExtreme in folder: /Game/Test
  2. Preview the multiply node with the texture alpha channel hooked into “A”
  3. Notice that the majority of the preview is just black, as expected.
  4. Now Open Material: m_t_Oodle296
  5. Preview the multiply node with the texture alpha channel hooked into “A”
  6. Notice how the preview gets filled with grey noise.

The two textures uses BC7 as compression Settings which introduces this bug.

The difference between the two textures are:

  1. Oodle sdk version
  2. Bool: Preserve Extremes When Compressing With Oodle

Oodle 2.9.7 and above in combination with Preserve Extremes When Compressing With Oodle=True removes the noise in the alpha channel.

Are there any downsides to making these two changes globally or as Project default?

BC3 and BC7 treat the separation of color and alpha channels differently, so it’s expected that the color channels bleed into alpha in the general case for BC7. This is just how the formats are specified. There are modes inside BC7 that separate the channels “mostly”, and specifying Preserve Extremes causes oodle to use those modes internally for textures with alpha=0 or alpha=255, so that’s likely what’s fixing it for you on this texture.

This particular problem is actually why we don’t default to BC7 across the board for textures - there are enough cases where you need this separation.

Preserve Extremes however dramatically affects encode quality and so should not be enabled project-wide.

I would recommend having a texture group for your textures that have uncorrelated alpha channels and setting it to use BC3 for your encoding (AutoDXT in the UI iirc).

Oodle SDK version should generally always be latest. We only pin it for patch reasons as it usually causes the texture to change enough that it has to get resent - if you haven’t released yet or don’t need to worry about patch sizes you can feel free to update that to latest at any time.

Great! Thank you for an enlighting answer :slight_smile:

Best

Felix