[x] Metadata textures are most likely thoroughly broken at the moment.
[ ] Lots of cleanup and doc updates are still necessary.
Previously, creating textures in Cesium for Unreal was a two stage process:
Do some work in a worker thread to turn the glTF Texture/Sampler/Image/ImageCesium into a LoadedTextureResult and Unreal FTextureResource. This was synchronous.
Do some work in the main thread to turn the above into an Unreal UTexture2D. This was also synchronous.
Now it's a three step process:
Create an FTextureResource from an ImageCesium, which may or may not be shared among multiple models/tiles. This happens in a worker thread but completes asynchronously (a Future resolves when it is done) because only the first worker thread that needs a shared image will process it, while the others wait (via Future) for the first.
Do some work in a worker thread to turn the above FTextureResource plus the glTF Texture/Sampler/Image/ImageCesium into a new FTextureResource (pointing to the same RHI texture) and a LoadedTextureResult. This part is synchronous.
Do some work in the main thread to turn the above into an Unreal UTexture2D. This part is also synchronous.
This is a PR into #1521. Still to do:
Previously, creating textures in Cesium for Unreal was a two stage process:
LoadedTextureResult
and UnrealFTextureResource
. This was synchronous.UTexture2D
. This was also synchronous.Now it's a three step process:
FTextureResource
from anImageCesium
, which may or may not be shared among multiple models/tiles. This happens in a worker thread but completes asynchronously (a Future resolves when it is done) because only the first worker thread that needs a shared image will process it, while the others wait (via Future) for the first.FTextureResource
plus the glTF Texture/Sampler/Image/ImageCesium into a newFTextureResource
(pointing to the same RHI texture) and aLoadedTextureResult
. This part is synchronous.UTexture2D
. This part is also synchronous.