Frostbite PBR: different compression on separate texture channels of the same texture

Is it possible, and if so, how would it be possible to create and read an RGBA texture with various compression algorithms on individual channels in OpenGL4.x:

Example A without a real value:

  • Channels
  • RG keep normal card encoded in 3Dc
  • B stores height values ​​to use tessellation with some encoding
  • The channel stores raw MaterialID without compression

Example B:

  • RGB stores material parameters compressed with DXT1
  • A saves MaterialID without compression

Background:

In the Frostbite Physical Assessment (PDF) implementation on pages 15 and 18, the authors describe how they structured the material parameters into different texture channels. They also mention that they avoided texture compression on some channels , without going into details about which channels they mean by that.

Page 15

All main attributes (Normal, BaseColor, Smoothness, MetalMask, Reflectance) must be mixed to support pending stickers. Immediate attributes, such as MaterialId, are stored in the alpha channel. We also have prevented compression and encoding mechanisms that can affect mix quality.

Page 18

We decided to avoid compression on several of our attributes and rely on simple, linear interpolation alpha blending in this case.

+5
source share
1 answer

There is no OpenGL support or hardware to read in the texture with different compression on different channels. Of course, you can create a prefix that would manually break such a texture into separate textures, and then unpack them separately.

As suggested by Nicol Bolas, the implementation of PBR Frostbite avoids compression due to mixing.

+1
source

All Articles