ReflectionProbe
Local environment capture and the area receiving its reflection.
Size defines the full local influence volume; OriginOffset moves the capture origin within it, and MaxDistance requests the internal camera range. CullMask selects captured geometry, while ReflectionMask selects geometry receiving the result: these masks have different roles.
GetSize, GetOriginOffset and GetMaxDistance return stored settings. They do not report GPU capture readiness or visual quality. Set a valid positive Size before OriginOffset and inspect the result on a material supporting reflected light.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ReflectionProbeConstructor
public ReflectionProbe();Creates the probe Entity and its owned RenderingServer resource. Defaults: Size=(20,20,20), OriginOffset=0, MaxDistance=0, Intensity=1, BlendDistance=1, UpdateMode=Once; both masks include the first 20 layers. BoxProjection, Interior and EnableShadows are off; AmbientMode=Environment. Construction does not mean GPU capture has completed: add the probe to an active 3D world. Release the Entity normally; its internal RID is not owned by calling code.
Properties15
AmbientColorProperty
public Color AmbientColor { get; set; }Constant ambient color for AmbientMode.Color, initially black. RD converts RGB from sRGB to linear space and applies AmbientColorEnergy and the probe contribution. Alpha does not control receiver transparency. Other ambient modes retain the value without using this color.
AmbientColorEnergyProperty
public float AmbientColorEnergy { get; set; }AmbientColor multiplier in Color mode, initially 1. Does not change light-source energy or captured geometry. Intensity additionally scales probe contribution. Use nonnegative values; the setter does not enforce the inspector hint range. At 0 the contribution RGB becomes black; Color mode remains active.
AmbientModeProperty
public ReflectionProbe.AmbientModeEnum AmbientMode { get; set; }Method of adding diffuse ambient contribution, initially Environment. Disabled adds none; Environment uses the most blurred capture level; Color uses AmbientColor and AmbientColorEnergy. This approximates local lighting, not multiple-bounce illumination. Disabled does not itself prohibit specular reflection, but default specular occlusion can suppress it when total ambient is zero.
BlendDistanceProperty
public float BlendDistance { get; set; }Contribution falloff width inside the Size box boundaries, initially 1. Zero removes the smooth transition while retaining the influence-box limit. Current RD computes axis-based falloff bounded by box half-sizes; this is not linear opacity over one distance or capture range.
BoxProjectionProperty
public bool BoxProjection { get; set; }Box-based reflection parallax correction using Size, initially false. RD adjusts direction using the reflecting surface position inside the box and OriginOffset. Useful for rectangular rooms, but does not reconstruct exact room geometry. Does not move the capture origin or set atlas resolution.
CullMaskProperty
public uint CullMask { get; set; }VisualInstance3D layer mask included in capture; the first 20 layers are enabled by default. Compared with captured-geometry layer bits, not a layer number. Does not select reflection receivers; use ReflectionMask for them. Zero excludes geometry but does not stop the probe or necessarily exclude sky.
EnableShadowsProperty
public bool EnableShadows { get; set; }Enables light-shadow computation during capture, initially false. RD supplies the probe shadow atlas; light types and their settings must also support shadows. Adds update work, especially with Always. Does not remove shading already baked into materials or lightmaps.
IntensityProperty
public float Intensity { get; set; }Multiplier for probe specular and additional ambient contribution, initially 1. Zero removes its lighting contribution but does not delete the probe or stop capture. This is not the power of lights within the capture. Use a nonnegative value; the setter does not enforce the inspector 0…1 hint.
InteriorProperty
public bool Interior { get; set; }Interior capture without background sky, initially false. Current RD excludes Environment from the probe capture render. This neither creates room lighting nor disables all main-camera lighting; visible ambient contribution also depends on AmbientMode and other sources.
MaxDistanceProperty
public float MaxDistance { get; set; }Requested capture-camera range, initially 0. The wrapper clamps it to 0…262144. The effective far plane is also expanded to the box boundaries relative to OriginOffset, so 0 does not disable capture. This is neither the probe visibility distance from the main camera nor its influence-box size.
MeshLodThresholdProperty
public float MeshLodThreshold { get; set; }Screen-size threshold for selecting existing captured-geometry LODs, initially 1. Current RD normalizes it by atlas resolution. Larger values can select less detailed LODs. Does not generate LODs or change main-camera LOD selection. Use nonnegative values; the setter does not clamp the range.
OriginOffsetProperty
public Vector3 OriginOffset { get; set; }Local capture-origin offset from the probe center, initially (0,0,0). For valid positive Size, components are constrained to ±(Size/2−0.01); reducing Size can change a previously assigned offset. Used by capture cameras and, with BoxProjection, reflection-direction correction. It does not move the influence box.
ReflectionMaskProperty
public uint ReflectionMask { get; set; }Layer mask of geometry receiving this probe reflection and ambient contribution; the first 20 layers are enabled by default. Current RD compares it with instance layers when applying the probe. Does not choose captured geometry; that is CullMask. Zero removes receivers but does not release capture or disable update processing.
SizeProperty
public Vector3 Size { get; set; }Full local dimensions of the influence box, not half-extents. Defaults to (20,20,20). Use positive components; the setter stores the vector without positive-size validation. Resizing also constrains the stored OriginOffset to the box. Set dimensions here rather than by scaling the Entity: ReflectionProbe disables inherited transform scaling.
UpdateModeProperty
public ReflectionProbe.UpdateModeEnum UpdateMode { get; set; }Capture update policy, initially Once. Once retains the result until invalidated; changing another object material alone does not guarantee recapture. Always repeats capture when the active probe is processed. Result readiness depends on visibility, scheduling and roughness processing, not just a setter call. Current RD uses a 256-pixel cubemap face capture size for Always; switching can recreate the shared atlas and has the documented texture-release limitation.
Methods30
AreShadowsEnabledbool
public bool AreShadowsEnabled();Returns EnableShadows, not whether suitable lights or completed captured shadows exist.
boolTrue when capture-shadow computation is enabled; initially false.
GetAmbientColorColor
public Color GetAmbientColor();Returns stored AmbientColor components, not the resulting linear lighting RGB.
ColorThe assigned Color, initially black.
GetAmbientColorEnergyfloat
public float GetAmbientColorEnergy();Returns stored AmbientColorEnergy regardless of the active AmbientMode.
floatThe configured constant-color multiplier, initially 1.
GetAmbientModeReflectionProbe.AmbientModeEnum
public ReflectionProbe.AmbientModeEnum GetAmbientMode();Returns the stored probe ambient mode, not capture readiness.
ReflectionProbe.AmbientModeEnumThe AmbientModeEnum value, initially Environment.
GetBlendDistancefloat
public float GetBlendDistance();Returns the stored BlendDistance transition width.
floatThe configured width in probe-local units, initially 1.
GetCullMaskuint
public uint GetCullMask();Returns the stored captured-layer mask.
uintThe CullMask bits, initially 0x000FFFFF.
GetIntensityfloat
public float GetIntensity();Returns stored Intensity, not measured reflected-pixel brightness.
floatThe configured contribution multiplier, initially 1.
GetMaxDistancefloat
public float GetMaxDistance();Returns the stored MaxDistance after clamping. Does not return the effective capture far plane, which the renderer can increase using Size and OriginOffset.
floatThe stored requested range in 0…262144. This is not the computed internal-camera far plane.
GetMeshLodThresholdfloat
public float GetMeshLodThreshold();Returns the stored capture LOD threshold.
floatThe MeshLodThreshold value, initially 1.
GetOriginOffsetVector3
public Vector3 GetOriginOffset();Returns the stored OriginOffset after constraining it inside the probe dimensions. It may differ from the SetOriginOffset argument or change after SetSize.
Vector3The local offset after constraining it to probe dimensions; initially (0,0,0).
GetReflectionMaskuint
public uint GetReflectionMask();Returns the stored receiver mask, not the capture-camera mask.
uintThe ReflectionMask bits, initially 0x000FFFFF.
GetSizeVector3
public Vector3 GetSize();Returns stored full local Size dimensions. The probe local GetAabb() has position -Size/2 and size Size; this is not the internal camera range.
Vector3The stored full local Size vector, initially (20,20,20). These are not half-extents or capture range.
GetUpdateModeReflectionProbe.UpdateModeEnum
public ReflectionProbe.UpdateModeEnum GetUpdateMode();Returns the configured update policy, not capture or filtering completion.
ReflectionProbe.UpdateModeEnumThe UpdateModeEnum value, initially Once.
IsBoxProjectionEnabledbool
public bool IsBoxProjectionEnabled();Returns the BoxProjection setting. True does not validate parallax accuracy for a particular room.
boolTrue when box correction is enabled; initially false.
IsSetAsInteriorbool
public bool IsSetAsInterior();Returns stored Interior, not a test of whether the room is enclosed.
boolTrue for interior mode; initially false.
SetAmbientColorvoid
public void SetAmbientColor(Color ambient);Stores the constant ambient color. Select AmbientMode.Color to use it; control contribution strength with AmbientColorEnergy and Intensity.
| Name | Type | Default |
|---|---|---|
ambient | Color | — |
ambientAmbient color; RGB is used. Alpha does not make the material translucent.
SetAmbientColorEnergyvoid
public void SetAmbientColorEnergy(float ambientEnergy);Sets the constant ambient-color multiplier. Requires AmbientMode.Color to affect lighting; increasing it does not add light fixtures or shadows.
| Name | Type | Default |
|---|---|---|
ambientEnergy | float | — |
ambientEnergyNonnegative RGB multiplier: 1 retains the original color strength. At 0 the contribution RGB becomes black, but AmbientMode does not switch to Disabled.
SetAmbientModevoid
public void SetAmbientMode(ReflectionProbe.AmbientModeEnum ambient);Selects the diffuse ambient source. AmbientColor and AmbientColorEnergy remain stored independently but are used in Color mode.
| Name | Type | Default |
|---|---|---|
ambient | ReflectionProbe.AmbientModeEnum | — |
ambientA valid AmbientModeEnum: Disabled, Environment or Color. Check material and specular occlusion separately for specular contribution.
SetAsInteriorvoid
public void SetAsInterior(bool enable);Switches interior mode and invalidates probe data for an update. Keep the capture origin outside solid geometry and provide room lighting.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableTrue excludes the environment from interior capture; false allows the normal environment.
SetBlendDistancevoid
public void SetBlendDistance(float blendDistance);Sets the boundary transition width. Use a nonnegative value: the setter does not validate the range. Does not enlarge Size or create additional probes.
| Name | Type | Default |
|---|---|---|
blendDistance | float | — |
blendDistanceFalloff width inside the box; 0 gives a hard boundary. This is not MaxDistance.
SetCullMaskvoid
public void SetCullMask(uint layers);Assigns geometry layers for the internal cameras and invalidates capture. The main Camera3D mask remains a separate setting.
| Name | Type | Default |
|---|---|---|
layers | uint | — |
layersLayer bits: 1u selects the first layer, 2u the second, 3u both. Zero excludes all geometry from capture.
SetEnableBoxProjectionvoid
public void SetEnableBoxProjection(bool enable);Enables or disables box-based reflection-direction correction. Fit Size and OriginOffset to the room first.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableTrue for box correction, false for ordinary capture sampling direction.
SetEnableShadowsvoid
public void SetEnableShadows(bool enable);Switches capture-shadow computation and invalidates probe data. Inspect quality and cost on the target platform.
| Name | Type | Default |
|---|---|---|
enable | bool | — |
enableTrue allows supported shadows in a new capture; false skips probe shadow computation.
SetIntensityvoid
public void SetIntensity(float intensity);Assigns the probe contribution multiplier. This is not a request to capture the scene again; inspect the result together with exposure, material and BlendDistance.
| Name | Type | Default |
|---|---|---|
intensity | float | — |
intensityNonnegative multiplier: 1 keeps the original contribution, 0 removes it. Capture may continue at zero.
SetMaxDistancevoid
public void SetMaxDistance(float maxDistance);Requested capture-camera range, initially 0. The wrapper clamps it to 0…262144. The effective far plane is also expanded to the box boundaries relative to OriginOffset, so 0 does not disable capture. This is neither the probe visibility distance from the main camera nor its influence-box size.
| Name | Type | Default |
|---|---|---|
maxDistance | float | — |
maxDistanceRequested capture range in project units. Negative values become 0 and values above 262144 are clamped to the upper bound.
SetMeshLodThresholdvoid
public void SetMeshLodThreshold(float ratio);Sets the LOD-selection threshold for subsequent captures. The setter itself does not invalidate an existing Once image; changing the setting does not prove new geometry has been captured.
| Name | Type | Default |
|---|---|---|
ratio | float | — |
ratioNonnegative screen-size threshold. Despite the ratio argument name, this is not a polygon-reduction percentage.
SetOriginOffsetvoid
public void SetOriginOffset(Vector3 originOffset);Local capture-origin offset from the probe center, initially (0,0,0). For valid positive Size, components are constrained to ±(Size/2−0.01); reducing Size can change a previously assigned offset. Used by capture cameras and, with BoxProjection, reflection-direction correction. It does not move the influence box.
| Name | Type | Default |
|---|---|---|
originOffset | Vector3 | — |
originOffsetLocal capture-origin offset. Set a valid positive Size first and inspect the stored value if exact placement matters.
SetReflectionMaskvoid
public void SetReflectionMask(uint layers);Sets object layers affected by the probe and updates its dependencies. To exclude an object from the captured image, change CullMask instead.
| Name | Type | Default |
|---|---|---|
layers | uint | — |
layersReceiver layer bits; 0 selects no receivers. This is not a layer number or CullMask.
SetSizevoid
public void SetSize(Vector3 size);Full local dimensions of the influence box, not half-extents. Defaults to (20,20,20). Use positive components; the setter stores the vector without positive-size validation. Resizing also constrains the stored OriginOffset to the box. Set dimensions here rather than by scaling the Entity: ReflectionProbe disables inherited transform scaling.
| Name | Type | Default |
|---|---|---|
size | Vector3 | — |
sizeFull X/Y/Z dimensions in local units. Use positive dimensions for a valid volume; the example uses at least 0.02 on every axis.
SetUpdateModevoid
public void SetUpdateMode(ReflectionProbe.UpdateModeEnum mode);Changes update policy and invalidates probe data. This is not a synchronous command returning a completed image. Account for Always cost and the known resource-release warning when switching modes.
| Name | Type | Default |
|---|---|---|
mode | ReflectionProbe.UpdateModeEnum | — |
modeA valid UpdateModeEnum: Once or Always. Start with Once for ordinary static surroundings.
ReflectionProbe.AmbientModeEnum
| Value | Description |
|---|---|
Color = 2 | Constant diffuse ambient from AmbientColor, scaled by AmbientColorEnergy and Intensity. Applies within the probe volume with BlendDistance falloff; does not create separate lights. |
Disabled = 0 | Adds no ambient from this probe. Does not disable environment ambient or other sources. Specular contribution is configured separately; default specular occlusion can suppress it when total ambient is zero. |
Environment = 1 | Diffuse ambient from the most blurred probe capture level. This is a local lighting approximation, not a complete multiple-bounce simulation. |
ReflectionProbe.UpdateModeEnum
| Value | Description |
|---|---|
Always = 1 | Repeats capture when the active probe is processed. Cost depends on the scene and updated probe count; there is no universal one-probe-per-scene limit. Current RD uses 256-pixel cubemap face capture size. Switching from Once can recreate the shared atlas; the known texture-release warning is described in the guide. |
Once = 0 | Retains capture until invalidated. Changing the probe transform requests an update; changing a nearby material alone does not guarantee one. Capture and filtering are renderer-scheduled, so completion after exactly six frames is not guaranteed. A suitable starting policy for static surroundings. |