KhronosGroup / KhronosGroup/glTF-Validator
Additional restrictions on alpha modes usage
- Dominant language
- Dart
- Stars
- 470
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/BabylonJS/Babylon.js/issues/3155
> shouldn't the 1.0 alpha in baseColor (absent either diffuse texture or vertex colour) essentially make BLEND meaningless?
Let's specify all valid combinations of `material.alphaMode` and alpha channel in
* `material.pbrMetallicRoughness.baseColorFactor`
* `material.pbrMetallicRoughness.baseColorTexture`
* `KHR_materials_pbrSpecularGlossiness.diffuseFactor`
* `KHR_materials_pbrSpecularGlossiness.diffuseTexture`
---
#### Proposal
- `OPAQUE`: Texture shouldn't contain alpha channel and factor's alpha value should be `1.0`.
- `MASK` & `BLEND`: Texture should contain alpha channel or factor's alpha value shouldn't be `1.0`.
#### Questions
- When reporting on invalid assets, what should issue's pointer be? Whole `material`, `material.alphaMode`, or specific textures/factors?
- What if MR material is OK, but SG isn't (or vice-versa)?
- What about vertex color's alpha channel?
/cc @bghgary @zellski @sebavan
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the proposal and the linked glTF issue, focusing on alphaMode with the listed metallic-roughness and specular-glossiness factors and textures. Resolve the open questions about invalid-asset pointers, mixed material validity, and vertex-color alpha before identifying implementation entry points. Done means the validator consistently enforces the agreed combinations and reports invalid assets at the chosen locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100