1

Edit
I figured out a tempoary fix for my initial question "how to disable this weird fog": Disable the fog in the lighting pannel (genius, right ?)

However, since I might need fog later, and it does not behave as I would expect, I still need to fix this issue.

Note: This only happens with exponential fog modes, not with linear.


I'm having issues with unity's universal render pipeline: A light grey fog, whose strength depends on the camera heading (see video)

Unity rendering issue (see how the plane geometry affects the fog)

The steps to reproduce are very simple (or just download the project here):

  • Create a universal render pipeline project
  • Delete the "example assets" from the scene
  • Create a floor with a quad (create quad, rotate, scale)
  • Create a new material
    • Shader: URP / unlit
    • Base map: black

That's it. Rotate around, see how the "unlit" plane is actually affected by a fog whose strength depends on the heading of the camera

  • Rotating the quad has the same effect as rotating the camera.
  • Rotating the directionnal light has no effect (except on the skybox)
  • Removing the Directionnal light has no effect (except on the skybox)
  • Removing the Post processing volume makes the "fog" stronger in all directions so the camera heading effect is less noticeable but still there
  • This happens in game mode as well as in the editor
  • Getting close to the ground makes the fog lighter
  • the camera position has an impact as well (this is more visible when testing with a plane rather than a quad)

system info:

  • tested on unity versions: 2019.4.18f1, 2019.4.20f1 (LTS), 2020.2.1f1
  • Windows 10 Home 19042.804

Is it possible this is a bug in the URP/unlit shader ?

Thanks for any help!

bastien girschig
  • 663
  • 6
  • 26

0 Answers0