mirror of
https://github.com/storytold/spark.git
synced 2026-10-13 23:52:44 +00:00
Fixed rendering, moved examples/editor option under Debug. Updated spark-viewpoint.md.
This commit is contained in:
committed by
Andreas Sundquist
parent
d707f283f5
commit
b39cf3873f
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user