Hi. I’m trying to make sun system. When i rotate not in playmode, it shows Global Illumination Preprocessing, and it looks good. When i rotate it in play mode, in night i can see too much. Is there any way to fix it?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
public class ResetGlobalIllumination : MonoBehaviour
{
ReflectionProbe baker;
void Start()
{
baker = gameObject.AddComponent<ReflectionProbe>();
baker.cullingMask = 0;
baker.refreshMode = ReflectionProbeRefreshMode.ViaScripting;
baker.mode = ReflectionProbeMode.Realtime;
baker.timeSlicingMode = ReflectionProbeTimeSlicingMode.NoTimeSlicing;
RenderSettings.defaultReflectionMode = DefaultReflectionMode.Custom;
}
void Update()
{
DynamicGI.UpdateEnvironment();
baker.RenderProbe();
RenderSettings.customReflectionTexture = baker.texture;
}
}