Files
UnrealEngineUWP/Engine/Source/Runtime/Renderer/Private/SparseVolumeTexture/SparseVolumeTextureViewerSceneProxy.h
sebastien hillaire a831062e45 Sparse volumetexture initial commit.
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]
2022-10-16 02:28:34 -04:00

38 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "PrimitiveSceneProxy.h"
#include "RendererInterface.h"
#include "SceneViewExtension.h"
class USparseVolumeTextureViewerComponent;
class FSparseVolumeTextureSceneProxy;
// Proxy representing the rendering of the SparseVolumeTextureViewer component on the render thread.
class FSparseVolumeTextureViewerSceneProxy : public FPrimitiveSceneProxy
{
public:
FSparseVolumeTextureViewerSceneProxy(const USparseVolumeTextureViewerComponent* InComponent, int32 FrameIndex, FName ResourceName = NAME_None);
virtual ~FSparseVolumeTextureViewerSceneProxy() = default;
const FSparseVolumeTextureSceneProxy* SparseVolumeTextureSceneProxy = nullptr;
FBoxSphereBounds VolumeWorldBounds;
protected:
//~ Begin FPrimitiveSceneProxy Interface
virtual SIZE_T GetTypeHash() const override;
virtual void CreateRenderThreadResources() override {};
virtual void DestroyRenderThreadResources() override {};
virtual void GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const override;
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
virtual uint32 GetMemoryFootprint() const override { return(sizeof(*this) + GetAllocatedSize()); }
//~ End FPrimitiveSceneProxy Interface
private:
};