You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Sparse Volume Texture asset from imported OpenVDB (only a single float channel for now). Static or animated sequence. It will be possible to generate SVT at runtime from GPU later. Using FEditorBulkData for handling raw source without loading everything when not caching or cooking. BulkData used at runtime for loading. No streaming yet. Importer with dependency on OpenVDB is in a SparseVolumeTexture module only loaded when in editor Sparse volume texture can be sampled from any materials (sample, sample parameter) and overridden on material instance and material instance dynamic. Added support for uint in compiler (fetch from page table, see SparseVolumeTextureGetVoxelCoord) Volume texture with u8 VirtualTextureLayerIndex!=255 (INDEX_NONE) are sparse texture. The layer index then represent what texture/attribute to sample. #preflight https://horde.devtools.epicgames.com/job/6346a466f93be0f6345af86c #rb Patrick.Kelly, Charles.deRousiers [CL 22551963 by sebastien hillaire in ue5-main branch]
28 lines
785 B
C++
28 lines
785 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SparseVolumeTextureModule.h"
|
|
|
|
#include "SparseVolumeTextureOpenVDB.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "SparseVolumeTextureModule"
|
|
|
|
IMPLEMENT_MODULE(FSparseVolumeTextureModule, SparseVolumeTexture);
|
|
|
|
void FSparseVolumeTextureModule::StartupModule()
|
|
{
|
|
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked<FAssetToolsModule>(TEXT("AssetTools")).Get();
|
|
AssetTypeActionsForSparseVolumeTexture = MakeShareable(new FAssetTypeActions_SparseVolumeTexture);
|
|
AssetTools.RegisterAssetTypeActions(AssetTypeActionsForSparseVolumeTexture.ToSharedRef());
|
|
|
|
#if PLATFORM_WINDOWS
|
|
// Global registration of the vdb types.
|
|
openvdb::initialize();
|
|
#endif
|
|
}
|
|
|
|
void FSparseVolumeTextureModule::ShutdownModule()
|
|
{
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|