MaterialPropertyBlock.CopyProbeOcclusionArrayFrom

Switch to Manual
public void CopyProbeOcclusionArrayFrom (Vector4[] occlusionProbes);
public void CopyProbeOcclusionArrayFrom (List<Vector4> occlusionProbes);

Parameters

occlusionProbes要从中复制的探针遮挡值的数组。

Description

此函数将整个源数组都复制到名为 unity_ProbesOcclusion 的 Vector4 属性数组中,用于实例化 Shadowmask 渲染。

If the array property doesn't exist on the MaterialPropertyBlock, it will be created with the length of the source array.
Call LightProbes.CalculateInterpolatedLightAndOcclusionProbes to calculate probe occlusion values at the given world space positions.
ArgumentNullException is thrown if occlusionProbes is null.
Note that all MaterialPropertyBlock arrays can only have a maximum of 1023 elements. Warnings are printed and the excess array elements are ignored if the source array exceeds the range.

另请参阅:CopySHCoefficientArraysFromGraphics.DrawMeshInstancedCommandBuffer.DrawMeshInstanced


public void CopyProbeOcclusionArrayFrom (Vector4[] occlusionProbes, int sourceStart, int destStart, int count);
public void CopyProbeOcclusionArrayFrom (List<Vector4> occlusionProbes, int sourceStart, int destStart, int count);

Parameters

occlusionProbes要从中复制的探针遮挡值的数组。
sourceStart要从中复制的源数组中第一个元素的索引。
destStart要复制到的目标 MaterialPropertyBlock 数组中第一个元素的索引。
count要复制的元素数量。

Description

此函数使用指定源和目标范围将源数组复制到名为 unity_ProbesOcclusion 的 Vector4 属性数组中,用于实例化 Shadowmask 渲染。

If the array property doesn't exist on the MaterialPropertyBlock, it will be created with the length of the spcified range.
Call LightProbes.CalculateInterpolatedLightAndOcclusionProbes to calculate probe occlusion values at the given world space positions.
ArgumentNullException is thrown if occlusionProbes is null.
ArgumentOutOfRangeException is thrown if the source or destination range is invalid.
Note that all MaterialPropertyBlock arrays can only have a maximum of 1023 elements. Warnings are printed and the excess array elements are ignored if the source array exceeds the range.

另请参阅:CopySHCoefficientArraysFromGraphics.DrawMeshInstancedCommandBuffer.DrawMeshInstanced