[patch] new fog shader

Everything about development and the OpenMW source code.
User avatar
dEnigma
Posts: 248
Joined: 24 Nov 2013, 21:24
Location: Hla Oad

Re: [patch] new fog shader

Post by dEnigma » 28 May 2015, 13:45

Damn, I really love this fog:

http://imgur.com/a/iiSCm

I think I should try it with some mods next
Some pirates achieved immortality by great deeds of cruelty or derring-do. Some achieved immortality by amassing great wealth. But the captain had long ago decided that he would, on the whole, prefer to achieve immortality by not dying

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

Re: [patch] new fog shader

Post by raevol » 29 May 2015, 00:39

dEnigma wrote:Damn, I really love this fog:

http://imgur.com/a/iiSCm
Is that anti-aliasing I see? <3 <3 <3

Ascent
Posts: 39
Joined: 28 Jun 2014, 04:32

Re: [patch] new fog shader

Post by Ascent » 29 May 2015, 01:22

Impressive!

User avatar
dEnigma
Posts: 248
Joined: 24 Nov 2013, 21:24
Location: Hla Oad

Re: [patch] new fog shader

Post by dEnigma » 29 May 2015, 14:16

raevol wrote:
dEnigma wrote:Damn, I really love this fog:

http://imgur.com/a/iiSCm
Is that anti-aliasing I see? <3 <3 <3
Of course ;)

I can't play at those settings though, just for screenshots :mrgreen:
Some pirates achieved immortality by great deeds of cruelty or derring-do. Some achieved immortality by amassing great wealth. But the captain had long ago decided that he would, on the whole, prefer to achieve immortality by not dying

User avatar
sjek
Posts: 407
Joined: 22 Nov 2014, 10:51

Re: [patch] new fog shader

Post by sjek » 29 May 2015, 17:11

distand land 20-30k works kinda good and with vurt trees and texture mods + some others :P

and speak of the devil posted on this to bethsoft background fog discussion.
http://forums.bethsoft.com/topic/151336 ... placement/

sorry for ahead
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

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

Re: [patch] new fog shader

Post by visvaldas » 15 Mar 2016, 10:39

I've ported it to the current version.
Unfortunately the performance impact seems to be bigger than on the ogre version - on my system at least (intel haswell igp).

Bugs: The height based fog looks wrong in water reflections because the scene is rendered upside down.
Also the sky might look odd because the fog isn't applied to it.

My whishlist:
Defines that indicate whether reflection or refraction are being rendered.
Enable shaders for sky and horizon.

For the water shader to work this also needs
water-shader-fix.patch
In the water shader the '#include' directive isn't respected - this patch fixes it.
(2.86 KiB) Downloaded 176 times
screenshot259.jpg
screenshot256.jpg
Attachments
fog-shader-osg.zip
(8.3 KiB) Downloaded 216 times
fog-shader-osg.patch
(12.01 KiB) Downloaded 135 times
Last edited by visvaldas on 15 Mar 2016, 11:04, edited 1 time in total.

User avatar
lgromanowski
Site Admin
Posts: 1177
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Github profile: https://github.com/lgromanowski
Contact:

Re: [patch] new fog shader

Post by lgromanowski » 15 Mar 2016, 10:43

Hi,
could you please post a few screenshots of new shader ported to OSG?
best regards,
Lukasz

User avatar
psi29a
Posts: 3659
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: [patch] new fog shader

Post by psi29a » 15 Mar 2016, 11:00

@visvaldas: make a pull request on github instead of posting patches here. it is easier to review and give comments there. :)

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

Re: [patch] new fog shader

Post by visvaldas » 15 Mar 2016, 11:10

lgromanowski wrote:Hi,
could you please post a few screenshots of new shader ported to OSG?
There you go :)
psi29a wrote:@visvaldas: make a pull request on github instead of posting patches here. it is easier to review and give comments there. :)
Will do, I just need to setup an account first.

Currently there are a number of hardcoded values - my idea for making them dynamic without requiring custom c++:
Make variables like fog/atmosphere color visible to scripts (if they aren't already).
Add a script command for setting arbitrary shader variables.
Run a script on every weather change which computes and sets the shader variables.
Edit: Hmm, it seems that vanilla mw script doesn't support structures/arrays so that might a bit cumbersome.

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

Re: [patch] new fog shader

Post by raevol » 16 Mar 2016, 04:05

It looks so amazing! I want this!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests