Skip to content

Commit

Permalink
Small gsplat init update (playcanvas#7286)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Jan 16, 2025
1 parent dc9b072 commit f46b390
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/scene/gsplat/gsplat-sorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ class GSplatSorter extends EventHandler {
const orderBuffer = this.orderTexture.lock({
mode: TEXTURELOCK_READ
}).buffer.slice();

// initialize order data
for (let i = 0; i < orderBuffer.length; ++i) {
orderBuffer[i] = i;
}

this.orderTexture.unlock();

// send the initial buffer to worker
Expand Down

0 comments on commit f46b390

Please sign in to comment.