[patch] new fog shader

Everything about development and the OpenMW source code.
Post Reply
visvaldas
Posts: 35
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post 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.
User avatar
damiel
Posts: 34
Joined: 16 Apr 2016, 11:46

Re: [patch] new fog shader

Post 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 :)
visvaldas
Posts: 35
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas »

Just saw that :)

EDIT: ah, you saw that I saw it :D
magamo
Posts: 109
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post by magamo »

Awesome, good to see you, visvaldis!
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol »

Is there a way to get this working currently? Would love to use it with the distant terrain we just got...
magamo
Posts: 109
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post 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.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol »

So we'll need to recompile to use it? Not all of the patches got merged?
visvaldas
Posts: 35
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas »

screenshot278.png
magamo
Posts: 109
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post 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
visvaldas
Posts: 35
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post 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
Post Reply