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

Vertex Colors usage missing in the spec #1998

Closed
migueldgg opened this issue Jul 5, 2021 · 3 comments
Closed

Vertex Colors usage missing in the spec #1998

migueldgg opened this issue Jul 5, 2021 · 3 comments

Comments

@migueldgg
Copy link

The glTF 2.0 spec used to state the following:

In addition to the material properties, if a primitive specifies a vertex color using the attribute semantic property COLOR_0, then this value acts as an additional linear multiplier to baseColor.

This sentence was removed in commit d6e9c90, making it unclear how vertex colors should be used in the final color computation.

It would be important to get this crucial bit of information back in the specification.

@mlimper
Copy link
Contributor

mlimper commented Jul 6, 2021

TBH, it's not perfectly clear to me yet how vertex colors are assumed to be stored / used... both questions are connected.

storage: sRGB vs. linear?
use case: multiply brightness / ao vs. storing actual colors?

If someone has some insight into what was originally intended, that would probably be helpful in order to add more details / explanation to the spec

@lexaknyazev
Copy link
Member

It's restored in the new spec draft (#1997).

TL;DR

  • Base color is given by a baseColorTexture, that is 8-bit sRGB.
  • When the texture slot is empty, the texture is defined as returning (1.0, 1.0, 1.0, 1.0) for all pixels.
  • baseColorFactor and COLOR_0 values are linear multipliers.

@lexaknyazev
Copy link
Member

The updated spec has been released.

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

3 participants