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

ETC1S Texture Video Specification (wiki page) says flip bit = 1 #377

Open
nigeltao opened this issue Aug 23, 2024 · 1 comment
Open

ETC1S Texture Video Specification (wiki page) says flip bit = 1 #377

nigeltao opened this issue Aug 23, 2024 · 1 comment

Comments

@nigeltao
Copy link
Contributor

https://github.com/BinomialLLC/basis_universal/wiki/.basis-File-Format-and-ETC1S-Texture-Video-Specification

says (emphasis added)

In ETC1S, the mode is always differential (diff bit=1), the Rd, Gd, and Bd color deltas are always (0,0,0), and the flip bit is always set. ETC1S blocks are specified using the 15-bit 555 base color (called "color endpoints" in this specification, which is terminology derived from our BC1 texture format systems), the 3-bit intensity table index, and the 4x4 texel array of 2-bit selector indices (which are called "pixel index bits" in the Khronos ETC1 specification).

The Khronos spec says

the flip bit is encoded as 0 — the subsets are identical anyway.

I mean, it doesn't matter much in practice. As Khronos says, both halves of the 4×4 block have the same base color regardless of flip-ness. But as someone writing an ETC1S encoder, I was momentarily confused on what to output and this wiki page ranks pretty highly when doing a web search for "etc1s specification".

BasisU code also emits flip bit = 0:

//block.set_flip_bit(true);
// Setting the flip bit to false to be compatible with the Khronos KDFS.
block.set_flip_bit(false);


Relatedly, the Khronos spec also sas that "The [3 bit] Table codeword for each subblock is identical" but this wiki page also doesn't explicitly mention this constraint, unless you count the "the" (meaning unique) in "the 3-bit intensity table index".

@richgel999
Copy link
Contributor

richgel999 commented Aug 24, 2024

Thanks - I've changed our wiki spec to say: "In ETC1S, the mode is always differential (diff bit=1), the Rd, Gd, and Bd color deltas are always (0,0,0), and the flip bit is always not set (not that this matters in practice)."

I'll re-read our spec vs. the Khronos doc and see if I can make things more clear/consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants