Version: 2023.1

SphericalHarmonicsL2

struct in UnityEngine.Rendering

切换到手册

描述

高达二阶的球谐函数(3 个波段,9 个系数)。

球谐函数 (SH) 表示各方向上的函数或信号,常在计算机图形中用于高效计算平滑光照。Unity 将它们用于 LightProbes 和环境光照。

L2 球谐函数由 9 个系数(用于每个颜色通道)组成。

另请参阅:RenderSettings.ambientModeRenderSettings.ambientProbeLightProbes

变量

this[int,int]访问各个 SH 系数。

公共函数

AddAmbientLightAdd an ambient light to the spherical harmonics.
AddDirectionalLightAdd a directional light to the spherical harmonics.
ClearClears the spherical harmonics coefficients to zero.
EvaluateEvaluates the spherical harmonics for each given direction. The directions and results arrays must have the same size.

运算符

operator !=Returns true if the spherical harmonics are different.
operator *按给定系数缩放 SH。
operator +Adds two spherical harmonics.
operator ==Returns true if the spherical harmonics are equal.