Fixed rendering, moved examples/editor option under Debug. Updated spark-viewpoint.md.

This commit is contained in:
Andreas Sundquist
2025-07-23 08:06:30 -07:00
committed by Andreas Sundquist
parent d707f283f5
commit b39cf3873f
4 changed files with 13 additions and 10 deletions
+4 -3
View File
@@ -535,9 +535,10 @@ export class SparkRenderer extends THREE.Mesh {
// Alternating debug flag that can aid in visual debugging
this.uniforms.debugFlag.value = (performance.now() / 1000.0) % 2.0 < 1.0;
// if (viewpoint.stochastic) {
// (this.geometry as SplatGeometry).instanceCount = this.uniforms.numSplats.value;
// }
if (viewpoint.display && viewpoint.stochastic) {
(this.geometry as SplatGeometry).instanceCount =
this.uniforms.numSplats.value;
}
}
if (viewpoint.target) {
+5
View File
@@ -571,6 +571,11 @@ export class SparkViewpoint {
if (this.stochastic) {
activeSplats = numSplats;
// Render all splats in order since the Z-buffer
// will handle ordering.
for (let i = 0; i < numSplats; ++i) {
ordering[i] = i;
}
} else if (numSplats > 0) {
const {
reader,