Unity URP fog not working properly
Recently, I updated my render pipeline to URP, and I had some problems with the lighting but I managed to solve it in the last, but one problem is that my game contains fog, and as soon as I disable the fog, the game runs perfectly and there are no light matters, so I changed the fog type to linear, it was better, but I still have a problem, when the cubic player reaches a point, the lighting behaves really weird...
So can anyone help me with this issue?
This is what is happening to me
linear fog, two screenshots, and two different positions of the player 1:
2:
I'm using unity 2020.3.3f1 by the way...
Thanks for your help!
Answer by NullReferenceException01 · Feb 23 at 06:10 PM
I don't know if you still have this issue, or if you will see this, but what solved it for was to upgrade to Unity Editor 2021.2.0f1.
The problem was that fog in URP was rendered using the vertex shader as opposed to the pixel shader which is now used in 2021.2+ versions. Meaning that a large ground like yours would need a lot more vertices in the mesh to render accurately.
I had the same issue as you (with the same game template from Brackeys lol), as I was trying to get a glow material working for a power up. You can see my post about it on the forum here.
Your answer
Follow this Question
Related Questions
Light probes group editing not working properly 1 Answer
Floor unaffected by directional light 0 Answers
No Lighting seen through Stencil Window 0 Answers
How do you calculate unity_WorldToLight/_LightMatrix0 for directional light in C# 1 Answer
How to make shadows give the "cel shaded", or Killer 7 look? 0 Answers