@onerjs/core 8.54.3 → 8.54.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DeviceInput/webDeviceInputSystem.js +4 -0
- package/DeviceInput/webDeviceInputSystem.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +3 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +21 -2
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +17 -4
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +5 -3
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +15 -0
- package/Physics/v2/Plugins/havokPlugin.js +16 -6
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/characterController.js +2 -2
- package/Physics/v2/characterController.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/clusteredLightingCompute.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/clusteredLightingCompute.js +29 -0
- package/ShadersWGSL/ShadersInclude/clusteredLightingCompute.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightFragment.js +2 -3
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +2 -17
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.d.ts +6 -0
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js +123 -0
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.d.ts +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +2 -111
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/background.fragment.js +2 -1
- package/ShadersWGSL/background.fragment.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +2 -1
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.js +2 -1
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +2 -1
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +7 -0
- package/scene.pure.js +8 -0
- package/scene.pure.js.map +1 -1
|
@@ -2476,8 +2476,10 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2476
2476
|
splatIndex[index++] = sourceIndex;
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
|
+
// Pad with `vertexCount` itself, not 0: splat 0 is real data, not a reserved empty slot, and
|
|
2480
|
+
// range filtering can leave it fully visible — see gaussianSplattingSortWorker.ts.
|
|
2479
2481
|
for (; index < paddedVertexCount; index++) {
|
|
2480
|
-
splatIndex[index] =
|
|
2482
|
+
splatIndex[index] = vertexCount;
|
|
2481
2483
|
}
|
|
2482
2484
|
}
|
|
2483
2485
|
else {
|
|
@@ -2588,7 +2590,8 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2588
2590
|
type: "application/javascript",
|
|
2589
2591
|
})));
|
|
2590
2592
|
const positions = Float32Array.from(this._splatPositions);
|
|
2591
|
-
|
|
2593
|
+
const vertexCount = this._vertexCount;
|
|
2594
|
+
this._worker.postMessage({ command: GaussianSplattingSortWorkerCommand.POSITIONS, positions, vertexCount }, [positions.buffer]);
|
|
2592
2595
|
// The main thread owns the active interval set: send it explicitly (covering all indices when
|
|
2593
2596
|
// no LOD filter is active) rather than letting the worker assume the full source set.
|
|
2594
2597
|
this._postIntervalsToWorker();
|
|
@@ -2672,9 +2675,25 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2672
2675
|
while (width * height < length) {
|
|
2673
2676
|
height *= 2;
|
|
2674
2677
|
}
|
|
2678
|
+
// See the WebGL2/WebGPU branch below for why this guarantees an extra row when `length`
|
|
2679
|
+
// exactly fills every row. A power-of-2 height has to double to add any slack at all.
|
|
2680
|
+
// Usually this is a no-op since it is rare that the asset exactly contains a power-of-2
|
|
2681
|
+
// number of splats.
|
|
2682
|
+
if (length > 0 && width * height === length) {
|
|
2683
|
+
height *= 2;
|
|
2684
|
+
}
|
|
2675
2685
|
}
|
|
2676
2686
|
else {
|
|
2677
2687
|
height = Math.ceil(length / width);
|
|
2688
|
+
// When `length` exactly fills every row, force one extra (fully zeroed) row so the atlas
|
|
2689
|
+
// always has at least one genuinely-empty splat slot past the real data, at index `length`.
|
|
2690
|
+
// The sort worker (gaussianSplattingSortWorker.ts) relies on that slot always existing to
|
|
2691
|
+
// safely pad the 16-aligned draw order — without it, the only "spare" index would be the
|
|
2692
|
+
// last real splat, which range-filtering (setSplatIndexRanges/opacity/size culling) can
|
|
2693
|
+
// leave fully visible and opaque, reproducing the same "stuck in front" bug on that splat.
|
|
2694
|
+
if (length > 0 && height * width === length) {
|
|
2695
|
+
height += 1;
|
|
2696
|
+
}
|
|
2678
2697
|
}
|
|
2679
2698
|
if (height > width) {
|
|
2680
2699
|
Logger.Error("GaussianSplatting texture size: (" + width + ", " + height + "), maxTextureSize: " + width);
|