Since we are now in fair 3D, it’s time to use some clever tricks. One of such is terrain Fog Of War (FOW).
The trick is to keep in-game FOW data layout texture-friendly. That means that FOW data can be converted to a texture without additional processing simply as passing it as a pointer to texture maker function.Â Within terrain render FOW texture gets applied to the whole terrain at practically no cost.
- FOW edge is kind of troublesome at the moment, it shows an ugly “ladder” pattern. I hope there are techniques to make it more smooth without performance loss (maybe multi-tap sampling?).
- Objects, Units and Houses need to be treated separately, that’s not a big deal
- Water shader needs update too
- Black color is under question. Maybe it’s better to keep it dark-grey alike Fog?
And as always – post your feedback and comments!