-
Notifications
You must be signed in to change notification settings - Fork 186
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
Decoding DXT5_CCxY images #10
Comments
Hi ByteHazard, // RGB to YCbCr (same as JFIF JPEG).
|
Also, the low-level transcoder (in the inc directory) doesn't do anything special with CCXY textures. It's up to the caller to convert the texture data to sRGB. |
So crunch really encodes to YCbCr, and not YCoCg? Is this an error in the Readme, or did I overlook something? |
Yes, looking at the code I wrote years ago, it's YCbCr not YCoCg. I'll fix the docs, sorry! |
Thanks, that clears up my confusion. By the way, the NV paper (http://www.nvidia.com/object/real-time-ycocg-dxt-compression.html) mentions YCbCr only once, when it says "The RGB to YCoCg transform has been shown to be capable of achieving a decorrelation that is much better than that obtained by various RGB to YCbCr transforms [...]". This seems to imply that YCoCg would be a superior choice... I have not yet compared the two methods, but had great results with YCoCg * DXT5 on textures that look terrible with standard DXT1 (skybox textures with smooth gradients). |
Thanks - I was aware of that. I remember experimenting with YCoCg, but I don't recall why I didn't wind up using it. |
build executables in cmake output dir, not in subdirectories
How are YCoCg (DXT5_CCxY) encoded textures to be decoded in a shader?
I've tried the standard decode (taken from the original NV paper), but I'm not seeing the right results. When I encode to YCoCg manually before compressing to DXT5 with NVTT library, all is as expected.
The resulting DDS images produced by this method is clearly visually different from what crunch outputs.
I know YCoCg encoding is mentioned to be experimental. So does crunch apply do some extra tricks that require more work to decode? Or is this an issue with the encoder?
The text was updated successfully, but these errors were encountered: