directions | 要评估球面谐波的归一化方向数组。 |
results | 评估值输出数组。结果的顺序与 directions 数组相同。 |
评估每个给定方向的球面谐波。 directions
和 results
数组的大小必须相同。
using System.Collections; using UnityEngine;
public class ExampleClass : MonoBehaviour { void Start() { UnityEngine.Rendering.SphericalHarmonicsL2 sh2; LightProbes.GetInterpolatedProbe(new Vector3(0.0f, 0.0f, 0.0f), null, out sh2);
Vector3[] directions = new Vector3[] { new Vector3(0.0f, 1.0f, 0.0f), new Vector3(0.0f, -1.0f, 0.0f) }; Color[] results = new Color[2];
sh2.Evaluate(directions, results); } }