Describe the bug
When using Unity 6000.3 Keyword Declaration Override feature (under Project Settings > Graphics > Shader Build Settings) to override Shader Graph keywords (e.g., setting them to dynamic_branch) for glTFast's glTF-pbrMetallicRoughness shader, the override does not take effect in the final build unless the Allow Definition Override option is manually enabled on the corresponding keyword inside the Shader Graph or its SubGraph.
After enabling Allow Definition Override on the keyword, rebuilding resolves the issue and materials render correctly.
Additionally, the actual keyword name required in Keyword Declaration Override does not match the Reference name shown in Shader Graph's Blackboard. In my case, the Blackboard shows _EMISSIVE but the generated shader code uses _ _EMISSIVE. This point might require additional clarification.
Files
N/A – This issue is reproducible with the glTFast package's built-in Shader Graph shaders and does not require an external glTF file. No glTF files are attached.
To Reproduce
Steps to reproduce the behavior:
- In Project Settings > Graphics > Shader Build Settings, add a Keyword Declaration Override for a glTFast Shader Graph keyword (e.g.
_ _EMISSIVE) and set Type Override to dynamic_branch.
- Build the project (Windows Player or Standalone).
- Load any glTF/glb file at runtime that uses the _EMISSIVE keyword.
- Observe that the material renders pink / magenta (shader variant missing).
- Re-open the project and locate the glTFast Shader Graph asset (glTF-pbrMetallicRoughness) and its corresponding SubGraph(s).
- Find the
_EMISSIVE keyword in the Blackboard, select it, and enable Allow Definition Override.
- Rebuild the project.
- Load the same glTF file again.
- Observe that the material now renders correctly.
Expected behavior
The Keyword Declaration Override set in Project Settings should take effect without requiring manual intervention inside the Shader Graph / SubGraph assets.
Screenshots
Desktop (please complete the following information):
- glTFast version: 6.19.0
- Unity Editor version: 6000.3.17f1
- Render Pipeline: Universal Render Pipeline (URP) 17.3.0
- Platform: Editor / Windows Player (Standalone)
Additional context
Describe the bug
When using Unity 6000.3 Keyword Declaration Override feature (under Project Settings > Graphics > Shader Build Settings) to override Shader Graph keywords (e.g., setting them to dynamic_branch) for glTFast's glTF-pbrMetallicRoughness shader, the override does not take effect in the final build unless the Allow Definition Override option is manually enabled on the corresponding keyword inside the Shader Graph or its SubGraph.
After enabling Allow Definition Override on the keyword, rebuilding resolves the issue and materials render correctly.
Additionally, the actual keyword name required in Keyword Declaration Override does not match the Reference name shown in Shader Graph's Blackboard. In my case, the Blackboard shows
_EMISSIVEbut the generated shader code uses_ _EMISSIVE. This point might require additional clarification.Files
N/A – This issue is reproducible with the glTFast package's built-in Shader Graph shaders and does not require an external glTF file. No glTF files are attached.
To Reproduce
Steps to reproduce the behavior:
_ _EMISSIVE) and set Type Override to dynamic_branch._EMISSIVEkeyword in the Blackboard, select it, and enable Allow Definition Override.Expected behavior
The Keyword Declaration Override set in Project Settings should take effect without requiring manual intervention inside the Shader Graph / SubGraph assets.
Screenshots
Desktop (please complete the following information):
Additional context