Skip to content

Remove stale r_gltfGpuTangentFix; simplify glTF GPU vertex shaders#172

Merged
cursor[bot] merged 1 commit intomainfrom
cursor/stale-feature-flag-cleanup-2630
May 4, 2026
Merged

Remove stale r_gltfGpuTangentFix; simplify glTF GPU vertex shaders#172
cursor[bot] merged 1 commit intomainfrom
cursor/stale-feature-flag-cleanup-2630

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 3, 2026

Flags removed

  • r_gltfGpuTangentFix (Vulkan renderer cvar)

Why this is safe to delete

  • Default was 1; documentation described 0 as a legacy bind-pose-only tangent path that diverged from the intended PBR GPU behavior.
  • Runtime behavior now matches the previous default: PBR glTF GPU skin+morph always uses the vertex shader path with GLTF_GPU_TANGENT_FIX (Gram–Schmidt T vs deformed N).
  • Vk_Pipeline_Def.gltf_gpu_tangent_fixup was removed so pipeline dedup (memcmp on defs) no longer depends on a user toggle.

Implementation notes

  • scripts/compile_shaders.sh: glTF GPU vertex variants no longer compile a _tfix / non-fix pair; only the fix-enabled variant is emitted.
  • vk.modules.vert.gen_gltf_gpu is now [2][3][2][2][2] (one module per combo); vk_create_pipeline.c and vk_shutdown.c updated accordingly.
  • Regenerated shader_data.c / shader_binding.c (committed + spirv/generated/ copies).

Behavioral parity checks performed

  • ./scripts/compile_engine.sh vulkan (Release) — success
  • ctest in build-vk-Release (19 tests including smoke_test, renderer_regression_check) — all passed

Follow-up (optional)

  • Docs under docs/GLTF.md, docs/GLTF_GPU_UPLOAD.md, and docs/ROADMAP.md still mention r_gltfGpuTangentFix; update in a separate doc pass if desired.
Open in Web View Automation 

The cvar defaulted to 1 and only selected a legacy bind-pose tangent
shader variant. Drop the toggle, Vk_Pipeline_Def field, and duplicate
glTF GPU vertex SPIR-V variants; compile_shaders now emits only the
GLTF_GPU_TANGENT_FIX path. Regenerated shader blobs and bindings.

Co-authored-by: Tim Fox <timfox@outlook.com>
@cursor cursor Bot merged commit 330deb2 into main May 4, 2026
45 of 53 checks passed
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

Successfully merging this pull request may close these issues.

1 participant