(Case 1199696) 2019.3b11 Physically Based Sky goes black if camera y is below zero

Looks like there is some new code that cause the sky to not be rendered if your camera y is below zero. There is some new code in the shader that does this by checking to see if we are within the planet radius and not rendering the sky if so. This doesn’t make much sense since even if I am standing below the horizon line I may still be able to see the sky.

  1. Create scene with physically based sky
  2. Move camera below 1 on y axis. Notice that the sky is visible
  3. Move camera down by 2 units. Notice how the sky is missing.
1 Like

For anyone else who doesn’t want it to vanish you can modify

Runtime\Sky\PhysicallyBasedSky\PhysicallyBasedSkyRenderer.cs

line 326

            bool isPbrSkyActive = r > R; // Disable sky rendering below the ground

and just set that to true.

This is by design: Unity Issue Tracker - Camera renders black background when using Physical Sky & Camera.y < Planetary Radius + Planet Center Position

“Physically Based Sky works by precomputing sky lighting for a range of altitudes. The smallest altitude is 0, which starts at the sea level. Below the sea level, there is no information, so sky rendering is disabled. Make sure your game world is positioned above the sea level.”

Using a floating origin where my main camera is always 0 results in the black sky. May we get a position that we can write to?