Im working on a PR with a little cleanup, and there are a few redundant gl calls. Particularly expensive is populating depthIndex. Is there any reason to do it twice in RenderProgram? Everythink works fine if we keep only one call with buffer data. And there is realy no need to write depthIndex with every _render cycle - we should be doing it only if there is a new one.
Im working on a PR with a little cleanup, and there are a few redundant gl calls. Particularly expensive is populating depthIndex. Is there any reason to do it twice in RenderProgram? Everythink works fine if we keep only one call with buffer data. And there is realy no need to write depthIndex with every _render cycle - we should be doing it only if there is a new one.
on message from sortWorker: https://github.com/huggingface/gsplat.js/blob/9080a5a97140d842fbc4d85ee42987dd53de38e0/src/renderers/webgl/programs/RenderProgram.ts#L207
in render method: https://github.com/huggingface/gsplat.js/blob/9080a5a97140d842fbc4d85ee42987dd53de38e0/src/renderers/webgl/programs/RenderProgram.ts#L405
@dylanebert So, the question is: Is it done on purpose?