Fog improves performance - why?

ZireaelZireael Posts: 83Member

without fog
Without fog - circa 30 fps

with fog
With fog - circa 60 fps!

I am very happy but now that it happened, the question that can't leave me is - why?

Comments

  • TwistedTwiglegTwistedTwigleg Posts: 1,298Admin
    edited April 2018

    Probably because objects obscured by fog are not drawn, if I had to guess.

    It's interesting performance increases with fog. I wonder if performance goes up as the density/distance increases. It'd also be interesting to see if performance goes up with other seemingly unrelated things, like SSAO or MSAA.

    (BTW: Your game looks really neat!)

  • ZireaelZireael Posts: 83Member

    @TwistedTwigleg said:
    Probably because objects obscured by fog are not drawn, if I had to guess.

    That was my first thought, but the fog reaches the camera far plane either way, so things beyond the fog wouldn't be drawn without it too (camera culling).

    @TwistedTwigleg said:
    (BTW: Your game looks really neat!)

    Thanks, there's a thread for it over in the Projects section.

  • MegalomaniakMegalomaniak Posts: 1,273Admin
    edited April 2018

    Might be culling shader precision according to fog, seem to recall reading something about the fog and performance. Not sure where or what, a quick internet search didn't reveal anything familiar. Might have read it about another engine perhaps... :|

  • MagicLordMagicLord Posts: 578Unconfirmed
    edited April 2018

    If fog could improve performance all games would have a fog option :D
    BTW nice game.

  • MegalomaniakMegalomaniak Posts: 1,273Admin
    edited April 2018

    @MagicLord said:
    If fog could improve performance all games would have a fog option :D

    Pretty sure all modern engines support fog, question rather is if it improves performance in all situtations why would you even make it an option in your game? ;)

    edit: I mean you might leave optional parameters in to adjust fog, but why would you allow it to even be turned off then? :)

Sign In or Register to comment.