Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXT5 RGBM encoding support #361

Open
walbourn opened this issue Jun 9, 2023 · 0 comments
Open

DXT5 RGBM encoding support #361

walbourn opened this issue Jun 9, 2023 · 0 comments

Comments

@walbourn
Copy link
Member

walbourn commented Jun 9, 2023

As a way to save memory with lightmaps, a variant of DXT5/BC3 uses RGBM instead of RGBA to encode HDR content.

http://www.ludicon.com/castano/blog/2016/09/lightmap-compression-in-the-witness/

In a shader it would be reconstructed as:

float4 data = Texture.Sample(sampler, uv);
data.rgb = data.rgb * data.a * 5.0;
data.a = 1.0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant