Simple “Fog of War” Shader Outline To create a “fog of war” effect, you need to know the trail the player has taken. In order to store that trail we’ll use an option on Godot’s ViewPort: Render Target > ClearMode. Setting Clearmode to Never makes the Viewport never erase what it has drawn. This can be used as the trail the player made through the game world. We’ll use the render from this Viewport as a mask for a shader.