Version: 2020.3

LightProbes

class in UnityEngine

切换到手册

描述

存储所有当前已加载场景的光照探针。

数据包括:探针位置、球谐函数 (SH) 系数和四面体曲面细分。

可在运行时修改这些系数并更新四面体曲面细分。还可以使用 LightmapSettings.lightProbes 将整个 LightProbes 对象交换到不同的预烘培对象。

另请参阅:Unity 手册中的光照探针LightmapSettingsReceiveGI

变量

bakedProbes烘焙光照探针的系数。
cellCount空间划分为的单元格数(只读)。
count光照探针数(只读)。
positions烘焙光照探针的位置(只读)。

静态函数

CalculateInterpolatedLightAndOcclusionProbes计算给定世界空间位置处的光照探针和遮挡探针。
GetInterpolatedProbe对于合并的实时和烘焙光照探针,返回给定位置的插值探针。
TetrahedralizeSynchronously tetrahedralize the currently loaded LightProbe positions.
TetrahedralizeAsyncAsynchronously tetrahedralize the currently loaded LightProbe positions.

Events

needsRetetrahedralizationAn event which is called when the number of currently loaded light probes changes due to additive scene loading or unloading.
tetrahedralizationCompletedEvent which is called after LightProbes.Tetrahedralize or LightProbes.TetrahedralizeAsync has finished computing a tetrahedralization.