Comments (3)
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.
enum class InternalFormat
{
ETC2_SRGBA8 = 0x9279
}
switch (m_pfile->GetImageFormat())
{
case Image::Format::RGB8:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_RGB8;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGB8;
break;
case Image::Format::SRGB8:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_SRGB8;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGB8;
break;
case Image::Format::RGBA8:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_RGBA8;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGBA8;
break;
case Image::Format::SRGBA8:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_SRGBA8;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGBA8;
break;
case Image::Format::RGB8A1:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_RGB8A1;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGB8A1;
break;
case Image::Format::SRGB8A1:
m_data.m_u32GlInternalFormat = (unsigned int)InternalFormat::ETC2_SRGB8_PUNCHTHROUGH_ALPHA1;
m_data.m_u32GlBaseInternalFormat = (unsigned int)BaseInternalFormat::ETC2_RGB8A1;
break;
from etc2comp.
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.
from etc2comp.
I'm assuming this project was abandoned once Android got ASTC support.
Yes, it appears dead.
from etc2comp.
Related Issues (20)
- Make sure Colt McAnlis properly reads issues before closing them HOT 16
- Block should not know Image
- Which format? HOT 1
- Compressing normalmaps HOT 1
- Not all mipmap levels are generated for non-square images HOT 3
- -output flag not handling paths with spaces HOT 1
- Hardcoded include paths that do not make sense in windows
- PNG and EAC_RG11 support HOT 2
- how to improve compression speed HOT 5
- Default number of jobs is not correct
- Compressing small images (8x8 px png file)
- Mipmaps as input other than generating automatically
- assert() abort with ETC2A1 & RGBX
- Math-related error while building with vcpkg
- Near-infinite compression time on some textures. HOT 2
- Arm64 support
- R11 and RG11 seem to be computing data as 8-bits instead of 11-bit data.
- How to output pkm? HOT 1
- Memory leak of m_paucEncodingBits in Etc::Image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etc2comp.