Skip to content

Commit 3f830c5

Browse files
authored
Merge pull request #1414 from CesiumGS/fix-lod-fade
Fix LOD dithering artifacts
2 parents 405ea08 + d400660 commit 3f830c5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
##### Fixes :wrench:
1010

11+
- Fixed an issue with pixel dithering artifacts that could appear on tilesets.
1112
- Fixed an issue where DynamicPawn could get stuck after interrupting a flight from `UCesiumFlyToComponent`.
1213

1314
### v2.5.0 - 2024-05-01
-87.9 KB
Binary file not shown.

Source/CesiumRuntime/Private/CesiumGltfComponent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3568,8 +3568,6 @@ void UCesiumGltfComponent::UpdateFade(float fadePercentage, bool fadingIn) {
35683568
return;
35693569
}
35703570

3571-
fadePercentage = glm::clamp(fadePercentage, 0.0f, 1.0f);
3572-
35733571
UCesiumMaterialUserData* pCesiumData =
35743572
BaseMaterial->GetAssetUserData<UCesiumMaterialUserData>();
35753573

@@ -3582,10 +3580,12 @@ void UCesiumGltfComponent::UpdateFade(float fadePercentage, bool fadingIn) {
35823580
return;
35833581
}
35843582

3583+
fadePercentage = glm::clamp(fadePercentage, 0.0f, 1.0f);
3584+
35853585
for (USceneComponent* pChild : this->GetAttachChildren()) {
35863586
UCesiumGltfPrimitiveComponent* pPrimitive =
35873587
Cast<UCesiumGltfPrimitiveComponent>(pChild);
3588-
if (!pPrimitive || !pPrimitive->GetMaterials().Num()) {
3588+
if (!pPrimitive || pPrimitive->GetMaterials().IsEmpty()) {
35893589
continue;
35903590
}
35913591

0 commit comments

Comments
 (0)