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.
source share