Search Issue Tracker
Active
Under Consideration for 2021.3.X, 2022.2.X, 2022.3.X, 2023.1.X, 2023.2.X
Votes
1
Found in
2020.3.42f1
2021.3.14f1
2022.2.0b16
2023.1.0a19
2023.2.0a1
Issue ID
UUM-20042
Regression
No
RenderSettings.ambientProbe doesn't always return what it is set to
Description:
If RenderSettings.ambientMode is set to AmbientMode.Skybox, we currently have some pretty strange behavior:
If you set RenderSettings.ambientMode to a value "myProbe", the value you will read back from RenderSettings.ambientMode is "myProbe * GammaToLinearSpace(RenderSettings.ambientIntensity)". This means that, with certain settings, the following code will visibly change the ambient probe!
{code:java}
RenderSettings.ambientProbe = RenderSettings.ambientProbe;{code}
Which seems undoubtedly incorrect.
Repro
- Open any project, make a new scene and bake lighting for it
- Apply this script to an object in a scene:
{code:java}
using UnityEngine;
public class ambientytest : MonoBehaviour
{
void Update()
{
RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Skybox;
RenderSettings.ambientIntensity = 2f;
Debug.Log($"Probe[0, 0] = {RenderSettings.ambientProbe[0, 0]}");
RenderSettings.ambientProbe = RenderSettings.ambientProbe;
Debug.Log($"Probe[0, 0] = {RenderSettings.ambientProbe[0, 0]}");
}
} {code}
- Observe that the ambient probe explodes to infinity.
Full info here: [https://forum.unity.com/threads/setting-renderersettings-ambientprobe-changes-its-value.1363183/]
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment