-
Notifications
You must be signed in to change notification settings - Fork 120
EtcTool encoded sRGB(A) textures don't match source PNG. #49
Comments
Apart from not applying any srgb conversions to float on imported data before building mips, the constants written out to the KTX files are also not correct. So sRGB(A) data isn't written out with non-SRGB constants. Ugh.
|
Here's a collection of all the fixes that have never landed from various PRs into this tool to fix it. Google, can we get an update to the tool so that people aren't generating bad ETC2 files? Note that PVRTexToolGUI doesn't display gamma correctly as of 8/16/20. Mali Texture Tools (bitrotting since 2017) cannot open any ETC2 files with sRGB(A) set, but you can view the R/RG11 and non-sRGB format textures. macOS Preview cannot display content and Finder can't display dimensions or thumnails for ETC2 or PVRTC content, so trying to visually verify the output was an unfortunate challenge. |
Yes, it appears dead. |
The resulting images from EtcTool are too bright. This likely indicates some sRGB conversion on import, without a conversion back. Typically want to convert to high-precision linear color, build mips, and then convert each mip back to sRGB before the encode, or convert the endpoints ideally after the encode (so that you're fitting to linear and potentially premul colors). PVRTexToolCLI had a similar bug up until v4.24.
I also applied the min job change to 1, rectangular mip fixes, and max color bounding fixed listed as issues elsewhere on this bitrotting project. Timings for EtcTool (supposed to be so fast) are 900s at q70 vs. 44s for -qetcfast with PVRTexToolCLI using etcpack for the 100MB corpus of image that I'm using. I'm assuming 70 is pretty high quality, but this really isn't the fastest encoder in town or we're not using the magic setting for Etc2 textures. I'm assuming this project was abandoned once Android got ASTC support.
The text was updated successfully, but these errors were encountered: