class
LightProbeVolume
Allows you to define a volume of light probes that will be used for indirect lighting.
Lighting information in the scene will be interpolated from nearby probes to calculate the amount of indirect lighting at that position. It is up to the caller to place the light probes in areas where the lighting changes in order to yield the best results.
The volume can never have less than 4 probes.
Public
Constructors
LightProbeVolume
Methods
AddProbe
Adds a new probe at the specified position and returns a handle to the probe.
The position is relative to the volume origin.
RemoveProbe
Removes the probe with the specified handle.
Note that if this is one of the last four remaining probes in the volume it cannot be removed.
SetProbePosition
Updates the position of the probe with the specified handle.
GetProbePosition
Retrieves the position of the probe with the specified handle.
GetProbes
Returns a list of all light probes in the volume.
RenderProbe
Causes the information for this specific light probe to be updated.
You generally want to call this when the probe is moved or the scene around the probe changes.
RenderProbes
Causes the information for all lights probes to be updated.
You generally want to call this if you move the entire light volume or the scene around the volume changes.
Resize
Resizes the light probe grid and inserts new light probes, if the new size is larger than previous size.
New probes are inserted in a grid pattern matching the new size and density parameters.
Note that shrinking the volume will not remove light probes. In order to remove probes outside of the new volume call Clip().
Resize will not change the positions of current light probes. If you wish to reset all probes to the currently set grid position, call Reset().
- volume
- Axis aligned volume to be covered by the light probes.
- cellCount
- Number of grid cells to split the volume into. Minimum number of 1, in which case each corner of the volume is represented by a single probe. Higher values subdivide the volume in an uniform way.
Clip
Removes any probes outside of the current grid volume.
Reset
Resets all probes to match the original grid pattern.
This will reset probe positions, as well as add/remove probes as necessary, essentially losing any custom changes to the probes.
GetGridVolume
Returns the volume that's used for adding probes in a uniform grid pattern.
GetCellCount
Returns the cell count that's used for determining the density of probes within a grid volume.
staticGetRttiStatic
Protected
Constructors
LightProbeVolume
Methods
RunRenderProbeTask
Renders the light probe data on the render thread.
UpdateCoefficients
Fetches latest SH coefficient data from the render thread.
Note this method will block the caller thread until the data is fetched from the render thread. It will also force any in-progress light probe updates to finish.
CreateRenderProxy
Creates an object that contains render thread specific data and methods for this object.
Can be null if such object is not required.
CreateRenderProxySyncPacket
Creates a data packet that will be used for syncing the core object with it's render proxy.
Caller must free the retrieved packet using the provided allocator when done using it.
Initialize
Construct any resources the component needs before use.
Called when the parent scene object is initialized. A non-initialized component shouldn't be used in a live scene (i.e. it should not receive any of the component logic updates or events).
OnCreated
Called once when the component has been created.
Called regardless of the state the component is in.
OnDestroyed
Called once just before the component is destroyed.
Called regardless of the state the component is in.