Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#### Fixes :wrench:

- Materials loaded from type now respect submaterials present in the referenced material type. [#10566](https://github.com/CesiumGS/cesium/issues/10566)
- Fix flickering artifact in Gaussian splat models caused by incorrect sorting results. [#12662](https://github.com/CesiumGS/cesium/issues/12662)

#### Additions :tada:

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [Matt Schwartz](https://github.com/mzschwartz5)
- [Easy Mahaffey](https://github.com/easymaahffey)
- [Pamela Augustine](https://github.com/pamelaAugustine)
- [宋时旺](https://github.com/BlockCnFuture)
8 changes: 5 additions & 3 deletions packages/engine/Source/Scene/GaussianSplatPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ GaussianSplatPrimitive.generateSplatTexture = function (primitive, frameState) {
},
});
}

primitive._vertexArray = undefined;
primitive._lastTextureHeight = splatTextureData.height;
primitive._lastTextureWidth = splatTextureData.width;

Expand Down Expand Up @@ -652,8 +652,9 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (

const uniformMap = renderResources.uniformMap;

const textureCache = primitive.gaussianSplatTexture;
uniformMap.u_splatAttributeTexture = function () {
return primitive.gaussianSplatTexture;
return textureCache;
};

if (primitive._sphericalHarmonicsDegree > 0) {
Expand Down Expand Up @@ -768,12 +769,13 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
scratchMatrix4B,
);

const vertexArrayCache = primitive._vertexArray;
const command = new DrawCommand({
boundingVolume: tileset.boundingSphere,
modelMatrix: modelMatrix,
uniformMap: uniformMap,
renderState: renderState,
vertexArray: primitive._vertexArray,
vertexArray: vertexArrayCache,
shaderProgram: shaderProgram,
cull: renderStateOptions.cull.enabled,
pass: Pass.GAUSSIAN_SPLATS,
Expand Down