Page 6 of 13

Re: [patch] new fog shader

Posted: 04 Feb 2017, 14:42
by visvaldas
I'm sorry for the silence - I guess I got stuck, being to perfectionist.
I still intend to clean up what I have and bring it to a mergeable state.

Re: [patch] new fog shader

Posted: 04 Feb 2017, 14:52
by damiel
Hey,

great to see you back, one thing pls note this post: viewtopic.php?f=6&t=4108&p=45490#p45490
I did a pull request with parts of your work, to be more specific the handlling of shader loading in water.cpp, so you dont have to take care of this anymore, just the fog shader itself :D

EDIT

I see you already saw this, disregard my babling then :)

Re: [patch] new fog shader

Posted: 04 Feb 2017, 14:54
by visvaldas
Just saw that :)

EDIT: ah, you saw that I saw it :D

Re: [patch] new fog shader

Posted: 06 Feb 2017, 21:20
by magamo
Awesome, good to see you, visvaldis!

Re: [patch] new fog shader

Posted: 16 Mar 2017, 10:32
by raevol
Is there a way to get this working currently? Would love to use it with the distant terrain we just got...

Re: [patch] new fog shader

Posted: 16 Mar 2017, 12:04
by magamo
The modified patch that I posted as it currently stands patches cleanly against the current codebase. I recommend turning 'force shaders = true' on in your settings.cfg so that the fog gets applied to all statics. It looks really good in the distance, less so up close.

Re: [patch] new fog shader

Posted: 17 Mar 2017, 02:38
by raevol
So we'll need to recompile to use it? Not all of the patches got merged?

Re: [patch] new fog shader

Posted: 30 Mar 2017, 08:18
by visvaldas
screenshot278.png

Re: [patch] new fog shader

Posted: 30 Mar 2017, 11:38
by magamo
One thing that I've struggled with, is that I feel that this Shaffer works a little too intensely close up, meaning that you always travel in fog, and even in your latest screenshot, it obscures the local and world maps.

Once those are resolved, this is pretty awesome! The map piece may be a bug in the code. I don't think we want shaders to affect it

Re: [patch] new fog shader

Posted: 09 Apr 2017, 17:17
by visvaldas
magamo wrote:One thing that I've struggled with, is that I feel that this Shaffer works a little too intensely close up, meaning that you always travel in fog, and even in your latest screenshot, it obscures the local and world maps.

Once those are resolved, this is pretty awesome! The map piece may be a bug in the code. I don't think we want shaders to affect it
I haven't yet looked into how the map is affected by shaders.

The visibility is calculated by a function which can be easily changed.
So far I have used

Code: Select all

visibility = exp(-fogAmount)
which gives a rather gradual and smooth appeareance, but has the effect you decribed.
screenshot284.png

Code: Select all

visibility = exp(-fogAmount^2)
results in sharper contrast and is probably what you want.
screenshot285.png