Search Issue Tracker
By Design
Votes
0
Found in
2021.3.37f1
2022.3.25f1
2023.3.0b10
6000.0.0b16
Issue ID
UUM-70279
Regression
No
[URP][Lighting] The skybox doesn't render after changing the settings of the Material when using the URP Render Pipeline
Steps to reproduce:
1. Open the attached “Bugs2023” project
2. Open “SampleScene”
3. Select “Assets/Skybox_Cubemap (Blurred)” and in the Inspector window change the Rotation variable
4. Observe the Scene view
Expected result: The skybox is rendered or throws an error in the Console
Actual result: The skybox is displayed as a solid color without any errors
Reproducible with: 2021.3.37f1, 2022.3.25f1, 2023.2.19f1, 6000.0.0b16
Testing environment: macOS Sonoma 14.4.1 (Intel), macOS 14.4.1 (M2), Windows 10
Not reproducible on: No other environment tested
Notes:
- Reproducible in both the Editor and the Player
- In the Player, the skybox is rendered as black color
- Doesn’t reproduce when changing Default Render Pipeline in Project Settings → Graphics to None
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crash on "PPtr<Shader>::operator Shader*() const" when checking in changes with a very long comment in Unity Version Control window
- [Ubuntu] Toolbar and menu items for Version Control lack spaces in text on Linux
- Unity Version Control window Pending Changes tab’s Item checkbox is unresponsive when clicked and the item list is empty
- Audio stuttering occurs when heavy processing is performed while OnAudioFilterRead is in use
- Inconsistent Node search results in VFX Graph
Resolution Note:
As with https://issuetracker.unity3d.com/issues/unity-speccube0-is-not-set-when-there-are-no-gameobjects-in-the-scene , this is by design. unity_SpecCube0 and accompanying shader uniforms are only intended to be used in shaders that are applied to a renderer in the scene. Using the uniforms in a skybox shader will result in reading unspecified data. This applies to both URP and BiRP, although the setup 'works' by coincidence in BiRP for the specific scene, due to the uniform leaking from a previous drawcall.
If your usecase demands feeding a cubemap to your skybox shader, you can set it manually using Material.SetTexture on RenderSettings.skybox, or by using Shader.SetGlobalTexture. The baked skybox reflection texture is available via the ReflectionProbe.defaultTexture property.