Adds a hardware (GPU) skinning path next to the existing software (CPU) path.
Hardware (default):Poser only computes bone matrices; ModelNode::uploadBoneMatrices() writes them to an RGBA32F texture (3 texels per bone, 1024 bones per row) on unit 3, and the GLSL 1.20 vertex shader skins with texture2DLod. Bone indices/weights are vertex attributes 6/7.
Software: unchanged multithreaded CPU skinning.
GpuCapsProbe (realize operation, chained before ImGui's) checks vertex texture fetch + float textures; ModelNode falls back to software if either is missing.
Morphs stay on the CPU in both modes, but Poser now re-applies them only when morph weights change; hardware mode then re-uploads rest positions only in that case.
Since hardware mode keeps rest positions in the vertex arrays, drawables use a bounds callback built from posed bone positions plus the max vertex-to-bone distance, so culling and near/far stay correct.
UI: View menu radio buttons (GPU skinning greyed out if unsupported), "Skinning: GPU/CPU" in the Model window. CLI: --skinning gpu|cpu; --bench prints the active mode and GL renderer.
Test: emulates the shader's column layout on skinMatrices() + morphedPositions() and compares against software positions.
Verified CPU vs GPU renders are pixel-identical (no pixel differs by more than 16/255) for posed Miku PMD and Mixamo FBX on Linux (llvmpipe), and posed Karin PMX on the Intel HD 6000 Mac.
Adds a hardware (GPU) skinning path next to the existing software (CPU) path.
- **Hardware (default):** `Poser` only computes bone matrices; `ModelNode::uploadBoneMatrices()` writes them to an RGBA32F texture (3 texels per bone, 1024 bones per row) on unit 3, and the GLSL 1.20 vertex shader skins with `texture2DLod`. Bone indices/weights are vertex attributes 6/7.
- **Software:** unchanged multithreaded CPU skinning.
- `GpuCapsProbe` (realize operation, chained before ImGui's) checks vertex texture fetch + float textures; `ModelNode` falls back to software if either is missing.
- Morphs stay on the CPU in both modes, but `Poser` now re-applies them only when morph weights change; hardware mode then re-uploads rest positions only in that case.
- Since hardware mode keeps rest positions in the vertex arrays, drawables use a bounds callback built from posed bone positions plus the max vertex-to-bone distance, so culling and near/far stay correct.
- UI: View menu radio buttons (GPU skinning greyed out if unsupported), "Skinning: GPU/CPU" in the Model window. CLI: `--skinning gpu|cpu`; `--bench` prints the active mode and GL renderer.
- Test: emulates the shader's column layout on `skinMatrices()` + `morphedPositions()` and compares against software positions.
Verified CPU vs GPU renders are pixel-identical (no pixel differs by more than 16/255) for posed Miku PMD and Mixamo FBX on Linux (llvmpipe), and posed Karin PMX on the Intel HD 6000 Mac.
| Mac, Karin | CPU deform per change | GPU deform per change |
|---|---|---|
| PMX (bench changes a bone + morph) | 2.09 ms | 0.37 ms |
| FBX (bench morph touches many verts) | 1.88 ms | 1.78 ms |
[Written by Devin](https://app.devin.ai/sessions/edc92906d52f4fb09179a164d60f5f27)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a hardware (GPU) skinning path next to the existing software (CPU) path.
Poseronly computes bone matrices;ModelNode::uploadBoneMatrices()writes them to an RGBA32F texture (3 texels per bone, 1024 bones per row) on unit 3, and the GLSL 1.20 vertex shader skins withtexture2DLod. Bone indices/weights are vertex attributes 6/7.GpuCapsProbe(realize operation, chained before ImGui's) checks vertex texture fetch + float textures;ModelNodefalls back to software if either is missing.Posernow re-applies them only when morph weights change; hardware mode then re-uploads rest positions only in that case.--skinning gpu|cpu;--benchprints the active mode and GL renderer.skinMatrices()+morphedPositions()and compares against software positions.Verified CPU vs GPU renders are pixel-identical (no pixel differs by more than 16/255) for posed Miku PMD and Mixamo FBX on Linux (llvmpipe), and posed Karin PMX on the Intel HD 6000 Mac.
Written by Devin