Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve blinking tiles when using skip LOD optimization #5820

Closed
wants to merge 3 commits into from
Closed
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
5 changes: 5 additions & 0 deletions Source/Scene/Cesium3DTileBatchTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ define([
'./BlendingState',
'./Cesium3DTileColorBlendMode',
'./CullFace',
'./DepthFunction',
'./getBinaryAccessor',
'./StencilFunction',
'./StencilOperation'
Expand Down Expand Up @@ -63,6 +64,7 @@ define([
BlendingState,
Cesium3DTileColorBlendMode,
CullFace,
DepthFunction,
getBinaryAccessor,
StencilFunction,
StencilOperation) {
Expand Down Expand Up @@ -1342,6 +1344,9 @@ define([
// selection depth to the stencil buffer to prevent ancestor tiles from drawing on top
derivedCommand = DrawCommand.shallowClone(command);
var rs = clone(derivedCommand.renderState, true);
if (rs.depthTest.enabled && rs.depthTest.func === DepthFunction.LESS) {
rs.depthTest.func = DepthFunction.LESS_OR_EQUAL;
}
// Stencil test is masked to the most significant 4 bits so the reference is shifted.
// This is to prevent clearing the stencil before classification which needs the least significant
// bits for increment/decrement operations.
Expand Down