/// <summary> /// Light probe runtime data is auto-computed when lightprobes are added/removed. If you move them at runtime, please call this method. /// </summary> /// <remarks> /// This will also update coefficients. /// </remarks> public void UpdateLightProbePositions() { RuntimeData = null; needPositionUpdate = false; // Initial load try { // Collect LightProbes var lightProbes = new FastList <LightProbeComponent>(); foreach (var lightProbe in ComponentDatas) { lightProbes.Add(lightProbe.Key); } // Need at least 4 light probes to form a tetrahedron if (lightProbes.Count < 4) { return; } RuntimeData = LightProbeGenerator.GenerateRuntimeData(lightProbes); } catch { // Allow failures // TODO: Log } }
/// <summary> /// Light probe runtime data is auto-computed when lightprobes are added/removed. If you move them at runtime, please call this method. /// </summary> /// <remarks> /// This will also update coefficients. /// </remarks> public void UpdateLightProbePositions() { VisibilityGroup.Tags.Set(LightProbeRenderer.CurrentLightProbes, null); needPositionUpdate = false; // Initial load try { // Collect LightProbes var lightProbes = new FastList <LightProbeComponent>(); foreach (var lightProbe in ComponentDatas) { lightProbes.Add(lightProbe.Key); } // Need at least 4 light probes to form a tetrahedron if (lightProbes.Count < 4) { return; } VisibilityGroup.Tags.Set(LightProbeRenderer.CurrentLightProbes, LightProbeGenerator.GenerateRuntimeData(lightProbes)); } catch { // Allow failures // TODO: Log } }