Lexdev.net - Civilization VI Fog of War

Compute shader based mask rendering.

  • Lexdev.net Tutorial
  • HLSL
  • Compute Shader
  • Unity
  • C#
This project is a tutorial on Lexdev.net.
Detailed information about it can be found on the website, as well as links to the template and final project.

About this project

The purpose of this project is to teach others how to use a simple compute shader to render to textures and how to use those textures as masks for a map reveal effect. Structured buffers are introduced, and the reader learns how to set the data of them. Even though the map is only 2-dimensional for simplicity (and to keep the time needed to create the tutorial project reasonable), the fog of war effect from Sid Meier's Civilization VI can be recognized quite easily.

At the time of writing this, the tutorial was visited over 40.000 times.

Gallery

Get in touch