CNA-BUG-277: The glTF importer still refuses a file that requires KHR_materials_specular, although its own registry note says every PBR renderer samples both specular maps
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 3b43bd86; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
GltfImportCore's registry keeps KHR_materials_specular unclaimed, so extensionsRequired refuses such a file, while the same record and the renderer inventory test state that every PBR renderer samples both maps; the record names no limit, and two tests still give a stale reason.
- Identifier
CNA-BUG-277- Category
- Bug
- Subsystem
- Models & glTF
- Status
- Narrowed (partially fixed; describes only what survives)
- Verified against
- CNA
3b43bd86(3b43bd8687ed46523d873f9bec4b32bd8481dcb5) - Severity
- Low (a triage suggestion, not a project priority)
- Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- ContentManager glTF import (and the offline converters) for files that list KHR_materials_specular in extensionsRequired or extensionsUsed; the extension-support registry (FindGltfExtensionEXT, IsGltfExtensionSupportedEXT)
Expected behaviour
The importer's extension registry is the one place that states what CNA implements (GLTF-334): an extension is claimed when every renderer that draws PBR materials applies it, and only an unimplemented extension listed in extensionsRequired refuses the file. CNA's own records close the specular-texture work: plans/plan_gltf.md's GLTF-344 row leaves no PBR renderer without both maps.
Actual behaviour at TARGET
The KHR_materials_specular record in GltfImportCore.cpp is still ImplementedWithNamedLimit with claimed = false. Its note now reads ‘… every PBR renderer samples both maps. Required use remains refused and optional use is warned by name.’, so it names no limit at all. IsGltfExtensionSupportedEXT returns the record's claimed flag, so ValidateGltfEXT throws for any file that lists the extension in extensionsRequired, and a file that only uses it loads with a warning naming the extension. GltfRendererPbrFallbackPolicyTests.cpp' SpecularTextureInventoryClassifiesEveryPbrRenderer lists every PBR renderer family (DIRECTX9, EasyGL, FNA3D, SDL_GPU, SOFTWARE and WEBGPU) as sampling both maps, with an empty factor-only set, and both maps survive direct import and offline .cnj. gltf-limitations.md repeats the classification: IMPLEMENTED_WITH_A_NAMED_LIMIT, with the same unexplained refusal.
Fixed since first recorded: the record no longer claims that renderer bindings are pending, so an optional use is no longer warned about missing bindings.
Source locations
modules/content/src/GltfImport/GltfImportCore.cpp— the extension registry KHR_materials_specular record (ImplementedWithNamedLimit, not claimed, no limit named); IsGltfExtensionSupportedEXT; the ValidateGltfEXT extensionsRequired gatemodules/content/tests/CNA/Internal/GltfImport/GltfRendererPbrFallbackPolicyTests.cpp— SpecularTextureInventoryClassifiesEveryPbrRenderer: six sampling families, factorOnly emptymodules/content/tests/CNA/Internal/GltfImport/GltfExtensionRegistryTests.cpp— pins the record as ImplementedWithNamedLimit and unclaimed, a renderer whose binding is still pendingmodules/content/tests/CNA/Internal/GltfImport/GltfContainerValidationTests.cpp— expects IsGltfExtensionSupportedEXT(KHR_materials_specular) to be falsedocs/gltf-limitations.md— KHR_materials_specular row: IMPLEMENTED_WITH_A_NAMED_LIMIT, required use refusedplans/plan_gltf.md— GLTF-344 row
Evidence
Read at 3b43bd86: the registry record and the extensionsRequired gate, the two tests that pin the record, the renderer inventory test and the GLTF-344 row of CNA's plan; not executed. The two pinning tests still give the old reasons (‘a renderer whose binding is still pending’, ‘the two optional texture inputs the importer still cannot represent’), which the inventory test, the record's own note and the import code contradict.
Re-verified at c6dec91f: the record's note was rewritten by def6f7747 to say every PBR renderer samples both maps, without changing claimed; the two pinning tests are unchanged. The only remaining reason CNA records is in plans/plan_gltf.md's GLTF-344 cell, written while two renderers still lacked the maps: ‘add the repository-wide texture audit and cross-renderer/reference image evidence, then claim the extension’. Neither the registry nor the tests name that as the limit. Not executed.
Focused reproduction
Illustrative; not run.
// scene.gltf: "extensionsUsed": ["KHR_materials_specular"],
// "extensionsRequired": ["KHR_materials_specular"]
Model model = content.Load<Model>("scene");
// throws: 'scene.gltf' lists 'KHR_materials_specular' in extensionsRequired, which CNA does not implement
Current tests
GltfExtensionRegistryTests.cpp and GltfContainerValidationTests.cpp assert the unclaimed state, so they pin the stale classification; the renderer inventory test asserts the opposite fact.
Regression test
Claim the extension (Implemented, claimed = true), update the two pinning tests to expect support, and add an import test with the extension in extensionsRequired that loads; or, if a real limit remains, name it in the record and the tests.
Blast radius
glTF files that list KHR_materials_specular in extensionsRequired are refused by the runtime importer and the converters; files that only use it load correctly with a warning. Other extensions and the specular rendering itself are unaffected.
Workaround
Remove KHR_materials_specular from the file's extensionsRequired (keep it in extensionsUsed); the maps are still imported and drawn.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Deep dives
- glTF import: the extension registry
- Known issues
- Bug index