playcanvas / playcanvas/engine
Add circular buffer texture for SkinInstance.
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
During my experiments with multi-rendering for the landscape, I noticed that using a ring buffer completely eliminated GPU stalls. It might be worth considering applying this principle to SkinInstance in the engine.
...
currentTextureIndex = 0;
...
get boneTexture() { this.boneTextures[this.currentTextureIndex]; }
...
uploadBones(device) {
this.boneTextures[this.currentTextureIndex].upload();
}
updateMatrices(...) {
this.currentTextureIndex = (this.currentTextureIndex + 1) % this.boneTextures.length;
...
}
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/scene/skin-instance.js around the referenced bone texture state, especially boneTexture, uploadBones, and updateMatrices. Trace how SkinInstance updates and uploads its textures, then determine the ring-buffer behavior needed to avoid GPU stalls and verify that the existing skinning path still uses the current texture correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100