光照探针着色器 uniform 值提取自为此渲染器设置的材质属性块。
Property unity_SHAr
, unity_SHAg
, unity_SHAb
, unity_SHBr
, unity_SHBg
, unity_SHBb
and unity_SHC
will be set to zero if they are not part of the MaterialPropertyBlock.
Property unity_ProbesOcclusion
will be calculated as in normal lighting if it is not part of the MaterialPropertyBlock.
请注意,在不同位置使用烘焙光照探针值可能会导致渲染错误,特别是在使用局部光照(例如点光源和聚光灯)时。在使用 Graphics.DrawMeshInstanced 绘制实例化对象时(这时光照探针数据经过预先计算并以数组形式提供),这种模式更为有用。
另请参阅:MaterialPropertyBlock、MaterialPropertyBlock.CopySHCoefficientArraysFrom、MaterialPropertyBlock.CopyProbeOcclusionArrayFrom。