[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 »

Damn, I really love this fog:

http://imgur.com/a/iiSCm

I think I should try it with some mods next
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol »

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 »

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

Re: [patch] new fog shader

Post by dEnigma »

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:
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: [patch] new fog shader

Post by sjek »

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

Re: [patch] new fog shader

Post by visvaldas »

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 468 times
screenshot259.jpg
screenshot256.jpg
Attachments
fog-shader-osg.zip
(8.3 KiB) Downloaded 482 times
fog-shader-osg.patch
(12.01 KiB) Downloaded 411 times
Last edited by visvaldas on 15 Mar 2016, 11:04, edited 1 time in total.
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Re: [patch] new fog shader

Post by lgromanowski »

Hi,
could you please post a few screenshots of new shader ported to OSG?
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: [patch] new fog shader

Post by psi29a »

@visvaldas: make a pull request on github instead of posting patches here. it is easier to review and give comments there. :)
visvaldas
Posts: 35
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas »

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

Re: [patch] new fog shader

Post by raevol »

It looks so amazing! I want this!
Post Reply