glTF-Validator icon indicating copy to clipboard operation
glTF-Validator copied to clipboard

Textures without fallbacks require extensions

Open emackey opened this issue 4 years ago • 2 comments

Any texture that fails to supply a source image should (must?) supply at least one required extension.

For example:

"textures": [
    {
      "sampler": 0,
      "extensions": {
        "KHR_texture_basisu": {
          "source": 2
        }
      }
    },

The above block implies that KHR_texture_basisu (or whatever extension may be used there) should be listed under extensionsRequired because otherwise there is no texture source.

/cc https://github.com/KhronosGroup/glTF-Sample-Models/pull/285

It might also be good to flag if the source is missing and there aren't any extensions:

"textures": [
    {
      "sampler": 0
    },

emackey avatar Jan 06 '21 17:01 emackey

There could potentially be a root-level extension like EXT_texture_default that provides a universal fallback image for all textures without defined source.

That said, I agree that assets with texture objects using BasisU extension without fallback should usually require BasisU extension.

lexaknyazev avatar Jan 06 '21 18:01 lexaknyazev

Interesting. Can we at least say that extensionsRequired must be present (not empty) in any glTF that omits a texture source?

emackey avatar Jan 06 '21 18:01 emackey