Skip to content

Conversation

@ViTeXFTW
Copy link
Owner

@ViTeXFTW ViTeXFTW commented Jan 26, 2026

Greptile Overview

Greptile Summary

This PR fixes a critical initialization issue where the bone matrix buffer for GPU skinning was not populated for models without animations. The fix ensures models with skeletons but no active animations still render correctly by initializing the buffer with rest pose transforms after skeleton computation.

  • Initializes boneMatrixBuffer_ with rest pose skinning matrices after skeletonPose_.computeRestPose()
  • Prevents uninitialized bone transforms in GPU skinning for static/non-animated skeletal models
  • Matches the existing pattern where bone matrices are updated during animation playback (src/main.cpp:988-991)
  • No issues found

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a focused bug fix that adds proper initialization for the bone matrix buffer. The implementation correctly mirrors the existing update pattern used during animation playback, uses the same validation checks (skeletonPose_.isValid()), and follows the established code style. The fix addresses a real initialization gap where GPU-skinned models without animations would have uninitialized bone matrices.
  • No files require special attention

Important Files Changed

Filename Overview
src/main.cpp Added rest pose bone matrix initialization to fix GPU skinning for non-animated models

Context used:

  • Context from dashboard - CLAUDE.md (source)
  • Context from dashboard - CLAUDE.md (source)

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ViTeXFTW ViTeXFTW merged commit fdce47e into dev Jan 26, 2026
1 check passed
@ViTeXFTW ViTeXFTW deleted the fix/no-animation-models branch January 28, 2026 19:23
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.

2 participants