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]
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#if WITH_EDITOR
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Factories/Factory.h"
|
|
|
|
#include "SparseVolumeTextureFactory.generated.h"
|
|
|
|
// Responsible for creating and importing Sparse Volume Texture objects
|
|
UCLASS(hidecategories = Object, MinimalAPI)
|
|
class USparseVolumeTextureFactory : public UFactory
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
public:
|
|
|
|
//~ Begin UFactory Interface
|
|
|
|
virtual bool ShouldShowInNewMenu() const override;
|
|
virtual FText GetDisplayName() const override;
|
|
virtual bool ConfigureProperties() override;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Create asset
|
|
|
|
virtual UObject* FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
|
|
|
virtual bool CanCreateNew() const override;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
// Import asset
|
|
|
|
virtual UObject* FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, const FString& Filename,
|
|
const TCHAR* Parms, FFeedbackContext* Warn, bool& bOutOperationCanceled) override;
|
|
|
|
virtual void CleanUp() override;
|
|
virtual bool FactoryCanImport(const FString& Filename) override;
|
|
virtual bool DoesSupportClass(UClass* Class) override;
|
|
virtual UClass* ResolveSupportedClass() override;
|
|
|
|
//~ End UFactory Interface
|
|
|
|
protected:
|
|
|
|
private:
|
|
};
|
|
|
|
#endif // WITH_EDITOR
|