Class ProbeReferenceVolume
The reference volume for the Probe Volume system. This defines the structure in which volume assets are loaded into. There must be only one, hence why it follow a singleton pattern.
Namespace: UnityEngine.Experimental.Rendering
Syntax
public class ProbeReferenceVolume
Fields
retrieveExtraDataAction
An action that is used by the SRP to retrieve extra data that was baked together with the bake
Declaration
public Action<ProbeReferenceVolume.ExtraDataActionInput> retrieveExtraDataAction
Field Value
| Type | Description |
|---|---|
| Action<ProbeReferenceVolume.ExtraDataActionInput> |
Properties
instance
Get the instance of the probe reference volume (singleton).
Declaration
public static ProbeReferenceVolume instance { get; }
Property Value
| Type | Description |
|---|---|
| ProbeReferenceVolume |
memoryBudget
Get the memory budget for the Probe Volume system.
Declaration
public ProbeVolumeTextureMemoryBudget memoryBudget { get; }
Property Value
| Type | Description |
|---|---|
| ProbeVolumeTextureMemoryBudget |
shBands
Declaration
public ProbeVolumeSHBands shBands { get; }
Property Value
| Type | Description |
|---|---|
| ProbeVolumeSHBands |
subdivisionDebugColors
Colors that can be used for debug visualization of the brick structure subdivision.
Declaration
public Color[] subdivisionDebugColors { get; }
Property Value
| Type | Description |
|---|---|
| Color[] |
Methods
Cleanup()
Cleanup the Probe Volume system.
Declaration
public void Cleanup()
DataHasBeenLoaded()
Returns whether any brick data has been loaded.
Declaration
public bool DataHasBeenLoaded()
Returns
| Type | Description |
|---|---|
| Boolean |
GetRuntimeResources()
Get the resources that are bound to the runtime shaders for sampling Adaptive Probe Volume data.
Declaration
public ProbeReferenceVolume.RuntimeResources GetRuntimeResources()
Returns
| Type | Description |
|---|---|
| ProbeReferenceVolume.RuntimeResources | The resources to bind to runtime shaders. |
GetVideoMemoryCost()
Declaration
public int GetVideoMemoryCost()
Returns
| Type | Description |
|---|---|
| Int32 |
Initialize(ProbeVolumeSystemParameters)
Declaration
public void Initialize(in ProbeVolumeSystemParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ProbeVolumeSystemParameters | parameters |
PerformPendingOperations(Boolean)
Perform all the operations that are relative to changing the content or characteristics of the probe reference volume.
Declaration
public void PerformPendingOperations(bool loadAllCells = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | loadAllCells | True when all cells are to be immediately loaded.. |
RenderDebug(Camera)
Render Probe Volume related debug
Declaration
public void RenderDebug(Camera camera)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera |
SetNumberOfCellsLoadedPerFrame(Int32)
Set the number of cells that are loaded per frame when needed.
Declaration
public void SetNumberOfCellsLoadedPerFrame(int numberOfCells)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | numberOfCells |
SortPendingCells(Vector3)
Perform sorting of pending cells to be loaded.
Declaration
public void SortPendingCells(Vector3 cameraPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | cameraPosition | The position to sort against (closer to the position will be loaded first). |
UpdateConstantBuffer(CommandBuffer, ProbeVolumeShadingParameters)
Update the constant buffer used by Probe Volumes in shaders.
Declaration
public void UpdateConstantBuffer(CommandBuffer cmd, ProbeVolumeShadingParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | A command buffer used to perform the data update. |
| ProbeVolumeShadingParameters | parameters | Parameters to be used when sampling the probe volume. |