Page MenuHomeWildfire Games

[POC] Reduce "popping" of actors out of FoW.
Needs ReviewPublic

Authored by wraitii on Nov 9 2020, 5:10 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Trac Tickets
#5606
Summary

A long-standing issue in 0 A.D. is that actors suddenly "pop" out of FoW, even though the terrain FoW itself is very gradual. This is fairly ugly.

There are two issues with this:

  • On the graphical side, the SoD/FoW texture is blurred to look nice, but that makes it wrong: parts of the map that aren't visible are marked as "slightly visible". This increases the popping significantly.
  • On the gameplay side, we ought to mark visible any actor that has some of it visible, not just the center.

This diff is a Proof of Concept fix for the graphical issue, by making the game not blur incorrectly. However, this makes the Los texture noticeably "blockier". I've included a dumb glsl-blur on top of it, which makes things look slightly better, but I think we need a more permanent solution. The trouble is that straight blurring isn't good, we ought to "bleed" darkness onto light, but never the opposite. This is likely slow, and the los-texture generation is already kinda slow (I measure 200µs per turn on my computer, which isn't negligible).

Another possibility would be upscaling the LOS texture compared to the LOS "grid", which would allow blurring over smaller "real" distances. This would take more GPU power, however.

Test Plan

Launch the game and explore around. You'll see much less popping than on SVN.

Event Timeline

wraitii created this revision.Nov 9 2020, 5:10 PM
Owners added a subscriber: Restricted Owners Package.Nov 9 2020, 5:11 PM
Vulcan added a comment.Nov 9 2020, 5:12 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3458/display/redirect

Vulcan added a comment.Nov 9 2020, 5:13 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2905/display/redirect

Vulcan added a comment.Nov 9 2020, 5:14 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1806/display/redirect

wraitii requested review of this revision.Nov 9 2020, 5:14 PM