Skip to content

Commit

Permalink
Tests passing.
Browse files Browse the repository at this point in the history
  • Loading branch information
azrogers committed Aug 16, 2024
1 parent 3663041 commit 5c4d926
Show file tree
Hide file tree
Showing 14 changed files with 182 additions and 273 deletions.
4 changes: 2 additions & 2 deletions Source/CesiumRuntime/Private/Cesium3DTileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "CesiumGeospatial/GlobeTransforms.h"
#include "CesiumGltf/ImageCesium.h"
#include "CesiumGltf/Ktx2TranscodeTargets.h"
#include "CesiumGltf/SharedAssetDepot.h"
#include "CesiumGltfComponent.h"
#include "CesiumGltfPointsSceneProxyUpdater.h"
#include "CesiumGltfPrimitiveComponent.h"
Expand Down Expand Up @@ -792,8 +793,7 @@ class UnrealResourcePreparer
pOptions->group,
// TODO: sRGB should probably be configurable on the raster overlay.
true,
std::nullopt,
nullptr);
std::nullopt);
return texture.Release();
}

Expand Down
12 changes: 5 additions & 7 deletions Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ std::optional<EncodedFeatureIdSet> encodeFeatureIdTexture(
TEXTUREGROUP_8BitData,
false,
// TODO: currently this is always the case, but doesn't have to be
EPixelFormat::PF_R8G8B8A8_UINT,
nullptr)));
EPixelFormat::PF_R8G8B8A8_UINT)));
featureIdTextureMap.Emplace(
pFeatureIdImage,
encodedFeatureIdTexture.pTexture);
Expand Down Expand Up @@ -568,16 +567,16 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart(
encodedFormat.bytesPerChannel * encodedFormat.channels);
}

CesiumGltf::ImageCesium imageCopy(image);
encodedProperty.pTexture = loadTextureAnyThreadPart(
image,
imageCopy,
TextureAddress::TA_Clamp,
TextureAddress::TA_Clamp,
TextureFilter::TF_Nearest,
false,
TEXTUREGROUP_8BitData,
false,
encodedFormat.format,
nullptr);
encodedFormat.format);
}

if (pDescription->PropertyDetails.bHasOffset) {
Expand Down Expand Up @@ -706,8 +705,7 @@ EncodedPropertyTexture encodePropertyTextureAnyThreadPart(
false,
// This assumes that the texture's image only contains one byte
// per channel.
EPixelFormat::PF_R8G8B8A8_UINT,
nullptr)));
EPixelFormat::PF_R8G8B8A8_UINT)));
propertyTexturePropertyMap.Emplace(pImage, encodedProperty.pTexture);
}
};
Expand Down
12 changes: 5 additions & 7 deletions Source/CesiumRuntime/Private/CesiumEncodedMetadataUtility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,16 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart(
}
}

CesiumGltf::ImageCesium imageCopy(image);
encodedProperty.pTexture = loadTextureAnyThreadPart(
image,
imageCopy,
TextureAddress::TA_Clamp,
TextureAddress::TA_Clamp,
TextureFilter::TF_Nearest,
false,
TEXTUREGROUP_8BitData,
false,
encodedFormat.format,
nullptr);
encodedFormat.format);
}

return encodedFeatureTable;
Expand Down Expand Up @@ -425,8 +425,7 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart(
// R8G8B8A8 form, but this does not necessarily need to be the
// case in the future.
isNormalized ? EPixelFormat::PF_R8G8B8A8
: EPixelFormat::PF_R8G8B8A8_UINT,
nullptr)));
: EPixelFormat::PF_R8G8B8A8_UINT)));
featureTexturePropertyMap.Emplace(
pImage,
encodedFeatureTextureProperty.pTexture);
Expand Down Expand Up @@ -529,8 +528,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart(
false,
// TODO: currently this is always the case, but doesn't have
// to be
EPixelFormat::PF_R8G8B8A8_UINT,
nullptr)));
EPixelFormat::PF_R8G8B8A8_UINT)));
featureIdTextureMap.Emplace(
pFeatureIdImage,
encodedFeatureIdTexture.pTexture);
Expand Down
Loading

0 comments on commit 5c4d926

Please sign in to comment.