[patch] new fog shader

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

Re: [patch] new fog shader

Post by visvaldas » 04 Feb 2017, 14:42

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: 28
Joined: 16 Apr 2016, 11:46

Re: [patch] new fog shader

Post by damiel » 04 Feb 2017, 14:52

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: 22
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas » 04 Feb 2017, 14:54

Just saw that :)

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

magamo
Posts: 74
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post by magamo » 06 Feb 2017, 21:20

Awesome, good to see you, visvaldis!

User avatar
raevol
Posts: 2502
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol » 16 Mar 2017, 10:32

Is there a way to get this working currently? Would love to use it with the distant terrain we just got...

magamo
Posts: 74
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post by magamo » 16 Mar 2017, 12:04

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: 2502
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol » 17 Mar 2017, 02:38

So we'll need to recompile to use it? Not all of the patches got merged?

visvaldas
Posts: 22
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas » 30 Mar 2017, 08:18

screenshot278.png

magamo
Posts: 74
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post by magamo » 30 Mar 2017, 11:38

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: 22
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas » 09 Apr 2017, 17:17

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

Who is online

Users browsing this forum: No registered users and 5 guests