[patch] new fog shader

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

Re: [patch] new fog shader

Post by visvaldas » 11 Jul 2018, 20:50


User avatar
Posts: 928
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: [patch] new fog shader

Post by lysol » 11 Jul 2018, 21:52

Normal mapped texture replacers, exclusive for OpenMW:
My Nexus page

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

Re: [patch] new fog shader

Post by psi29a » 11 Jul 2018, 22:05

Send a PR when ready ;)

User avatar
Posts: 151
Joined: 22 Oct 2017, 10:13
Github profile: https://gitlab.com/drummyfish

Re: [patch] new fog shader

Post by drummyfish » 11 Jul 2018, 22:15

I wouldn't believe fog can make such a huge difference, Amazing.

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

Re: [patch] new fog shader

Post by raevol » 11 Jul 2018, 22:27

So excited for this!!

Posts: 104
Joined: 28 May 2016, 17:28

Re: [patch] new fog shader

Post by magamo » 12 Jul 2018, 14:07

This is looking really good! It still affects the minimap, but it's usable, unlike with the old version. This is fantastic work!

User avatar
Posts: 403
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: [patch] new fog shader

Post by Thunderforge » 12 Jul 2018, 21:52

magamo wrote:
12 Jul 2018, 14:07
It still affects the minimap, but it's usable, unlike with the old version.
Fog on the minimap (and overhead map in general) might actually be a cool feature that roleplayers would enjoy. Maybe it's worth considering as an optional setting?

User avatar
Posts: 89
Joined: 20 Mar 2017, 02:12
Location: Sadrith Mora

Re: [patch] new fog shader

Post by Jemolk » 13 Jul 2018, 00:48

Beautiful! When we can haz new fog shader in or compatible with nightlies???

Posts: 27
Joined: 24 May 2015, 20:31

Re: [patch] new fog shader

Post by visvaldas » 14 Jul 2018, 15:29

Before this can be mainlined there should to be a way to easily switch between different fog implementations.
This is a bit complicated because the fog shader depends on several components I had to modify to make it work.
Among those are:
  • lighting calculations: lighting.glsl, mwworld/weather.cpp
  • sky rendering: the fog effect has to be applied to the sky too, to avoid artifacts. Therefore extensive changes are needed in mwrender/sky.cpp.
    Maybe the sky manager can be subclassed to allow different implementations.

Posts: 1
Joined: 17 Jul 2018, 14:12

Re: [patch] new fog shader

Post by wolfraider » 17 Jul 2018, 14:21

Hi, I'm new here!

First off, great work with the shader, it looks real good in the screenshots. I seem to have a problem though.

I my game, the terrain has a blue hue to it, but not objects. Anyone else had the same problem? Here is the screenshot:

Here is my settings.cfg file, if it will help:

Code: Select all

# This is the OpenMW user 'settings.cfg' file.  This file only contains
# explicitly changed settings.  If you would like to revert a setting
# to its default, simply remove it from this file.  For available
# settings, see the file 'settings-default.cfg' or the documentation at:
#   https://openmw.readthedocs.io/en/master/reference/modding/settings/index.html

followers attack on sight = true
prevent merchant equipping = true
rebalance soul gem values = true
show effect duration = true
show enchant chance = true
show melee info = true
show owned = 2
show projectile damage = true

best attack = true
toggle sneak = true

always run = false
antialiasing = 16
resolution x = 1920
resolution y = 1080
vsync = true
fullscreen = true

field of view = 60.8911
near clip = 5
small feature culling = true
viewing distance = 30000.0
small feature culling pixel size = 5.0

subtitles = true

anisotropy = 16
texture mipmap = linear

num lights = 8
shaders = true
use static geometry = true

music volume = 0.325833

reflect actors = true
reflect statics = true
reflect terrain = true
refraction = true
rtt size = 2048
shader = true

global = true

character = hn

exterior cell load distance = 1

distant terrain = True
shader = true

auto use object normal maps = true
auto use object specular maps = true
force shaders = true

[Viewing distance]
fog end factor = 2.0
fog start factor = 1.0
limit small object distance = true
max viewing distance = 30000
small object distance = 4000
small object size = 10
viewing distance = 30000

Thanks for helping!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests