MaterialPropertyBlock.CopySHCoefficientArraysFrom(SphericalHarmonicsL2[] lightProbes)
This function converts and copies the entire source array into 7 Vector4 property arrays named unity_SHAr
, unity_SHAg
, unity_SHAb
, unity_SHBr
, unity_SHBg
, unity_SHBb
and unity_SHC
for use with instanced light probe rendering.
Parameters:
Name | Type | Description |
---|---|---|
lightProbes | SphericalHarmonicsL2[] | The array of SH values to copy from. |
Usage
---@type MaterialPropertyBlock
local materialpropertyblock;
---@type SphericalHarmonicsL2
local lightProbes;
materialpropertyblock.CopySHCoefficientArraysFrom(lightProbes)