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
- Brush Size in the Inspector window does not update when the Brush Size in Scene View is changed
- "ArgumentOutOfRangeException" errors are thrown every time a keyboard key is pressed when renaming a component in UI Builder with a symbol and changing the name after label attribute warning
- Values in "Rect Transform" component are only partially updated when changing values in Prefab Mode
- Same Asset Type Focused Inspectors do not repaint when menus are manipulated
- Bool or Trigger Parameters can be selected via right clicking to the right of a Parameter control in the Animator Window
Add comment