Fog of War - Unexpected Visibility for Moving Units
I'm developing an RTS game that implements Fog of War, but I'm getting an unexpected bug in which parts of the map become visible to units at the wrong moments.
To reproduce it, you need to move a unit a certain amount (and to a location that hasn't been explored before).
This is the bug I'm getting:
So, instead of a spherical area around the moving object becoming visible, a large sliver in the direction it's moving becomes visible instead.
I'm implementing this code using Shaders and two different cameras for the semi-transparent fog and opaque fog, as linked here:
https://andrewhungblog.wordpress.com/2018/06/23/implementing-fog-of-war-in-unity/
I'm sorry if I've uploaded this to the wrong place, but is there a particular reason why this would happen? Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613032145im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can't Get Simple Transparency Shader To Work 1 Answer
Lightweight Render Shader not receive shadows 0 Answers
Shadergraph same texture different result 0 Answers
How to fix URP's Shader Graph Shader displaying PNG texture with artifacts where alpha is zero? 1 Answer
Making clamped texture render parts outside of the uvs transparent 1 Answer