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
The sh bands
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()
Get approximate video memory impact, in bytes, of the system.
Declaration
public int GetVideoMemoryCost()
Returns
| Type | Description |
|---|---|
| Int32 | An approximation of the video memory impact, in bytes, of the system |
Initialize(in ProbeVolumeSystemParameters)
Initialize the Probe Volume system
Declaration
public void Initialize(in ProbeVolumeSystemParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ProbeVolumeSystemParameters | parameters | Initialization parameters. |
PerformPendingOperations()
Perform all the operations that are relative to changing the content or characteristics of the probe reference volume.
Declaration
public void PerformPendingOperations()
RenderDebug(Camera)
Render Probe Volume related debug
Declaration
public void RenderDebug(Camera camera)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera |
SetEnableStateFromSRP(Boolean)
Communicate to the Probe Volume system whether the SRP enables Probe Volume. It is important to keep in mind that this is not used by the system for anything else but book-keeping, the SRP is still responsible to disable anything Probe volume related on SRP side.
Declaration
public void SetEnableStateFromSRP(bool srpEnablesPV)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | srpEnablesPV | The value of the enable state |
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 |
UpdateCellStreaming(Camera)
Updates the cell streaming for a Camera
Declaration
public void UpdateCellStreaming(Camera camera)
Parameters
| Type | Name | Description |
|---|---|---|
| Camera | camera | The camera to be updated |
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. |