[patch] new fog shader

Everything about development and the OpenMW source code.
User avatar
raevol
Posts: 2786
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: [patch] new fog shader

Post by raevol » 08 Jan 2018, 23:25

My terminal log, launching and loading a save, then exiting:

Code: Select all

[email protected]:~$ openmw
Installing crash catcher
Loading config file: /home/raevol/.config/openmw/openmw.cfg... done.
Loading config file: /etc/openmw/openmw.cfg... done.
OpenMW version 0.43.0
Using default (English) font encoding.
OSG version: 3.4.1
StatsHandler::StatsHandler() Setting up GL2 compatible shaders
Loading settings file: /etc/openmw/settings-default.cfg
Loading settings file: /home/raevol/.config/openmw/settings.cfg
Adding BSA archive /home/raevol/.local/Morrowind/Data Files/Morrowind.bsa
Adding BSA archive /home/raevol/.local/Morrowind/Data Files/Tribunal.bsa
Adding BSA archive /home/raevol/.local/Morrowind/Data Files/Bloodmoon.bsa
Adding data directory /home/raevol/.local/Morrowind/Data Files
Adding data directory /home/raevol/.local/openmwmods
Initializing OpenAL...
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
Opened "Built-in Audio Analog Stereo"
  ALC Version: 1.1
  ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_pause_device
  Vendor: OpenAL Community
  Renderer: OpenAL Soft
  Version: 1.1 ALSOFT 1.17.2
  Extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length
HRTF disabled
Allocated 256 sound sources
Low-pass filter supported
EAX Reverb supported
Enumerated output devices:
  Built-in Audio Analog Stereo
Enumerated HRTF names:
  default-44100.mhr
  default-48000.mhr
  default-44100.mhr #2
  default-48000.mhr #2
Failed to open video: Resource 'video/bethesda logo.bik' not found
Loading content file Morrowind.esm
Loading content file Tribunal.esm
Loading content file Bloodmoon.esm
Loading content file Illy's Solsteim Rumour Fix.esp
Loading content file Morrowind Patch v1.6.3.esm
Loading content file adamantiumarmor.esp
Loading content file AreaEffectArrows.esp
Loading content file bcsounds.esp
Loading content file entertainers.esp
Loading content file LeFemmArmor.esp
Loading content file master_index.esp
Loading content file PB_SignpostsRetextured.esp
Loading content file Siege at Firemoth.esp
Loading content file EBQ_Artifact.esp
Playing Music/Special/morrowind title.mp3
Failed to open video: Resource 'video/mw_logo.bik' not found
Loading cell -3, 0
Loading cell -3, 1
Loading cell -3, 2
Loading cell -2, 0
Loading cell -2, 1
Loading cell -2, 2
Loading cell -1, 0
Loading cell -1, 1
Loading cell -1, 2
Playing music/explore/morrowind title.mp3
Quitting peacefully.
[email protected]:~$ 
Where I put the shaders:

Code: Select all

[email protected]:~$ ls -la .local/openmwmods/resources/shaders/
total 52
drwxrwxr-x 2 raevol raevol  4096 Jan  7 14:06 .
drwxrwsr-x 3 raevol raevol  4096 Aug 22 17:31 ..
-rw-rw-r-- 1 raevol raevol  6438 Jan  7 03:28 fog.glsl
-rw-rw-r-- 1 raevol raevol  4244 Jan  7 03:11 objects_fragment.glsl
-rw-rw-r-- 1 raevol raevol  2588 Jan  7 03:13 objects_vertex.glsl
-rw-rw-r-- 1 raevol raevol  2625 Jan  7 03:34 terrain_fragment.glsl
-rw-rw-r-- 1 raevol raevol  1118 Jan  7 03:16 terrain_vertex.glsl
-rw-rw-r-- 1 raevol raevol 10252 Jan  7 03:18 water_fragment.glsl
-rw-rw-r-- 1 raevol raevol   877 Jan  7 03:19 water_vertex.glsl
[email protected]:~$ 
Water does not look milky for me. :(

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

Re: [patch] new fog shader

Post by magamo » 08 Jan 2018, 23:54

Can you post a screenshot of what the game looks like? (With UI and minimap)

EDIT: I see the problem now. The shaders need to be put in resources/shaders of the OpenMW installation, not in your home directory.
Last edited by magamo on 08 Jan 2018, 23:59, edited 1 time in total.

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

Re: [patch] new fog shader

Post by raevol » 08 Jan 2018, 23:59


User avatar
AnyOldName3
Posts: 1123
Joined: 26 Nov 2015, 03:25

Re: [patch] new fog shader

Post by AnyOldName3 » 09 Jan 2018, 00:20

Reavol, did you definitely see the edit? I looks like it was made within the same minute as your post, but it should solve the issue.
AnyOldName3, Master of Shadows

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

Re: [patch] new fog shader

Post by raevol » 09 Jan 2018, 02:26

Yep that did it. Any reason why it doesn't work in a data folder like lysol's texture mods do?

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51
Contact:

Re: [patch] new fog shader

Post by scrawl » 09 Jan 2018, 02:36

If there is interest, I can try and see if I can get this to work with the Shadows branch too. However, with that still in flux, keeping that up to date moment to moment may be difficult. I would almost rather wait until the shadows work is finalized and then rebase this patch.
This thread is the perfect example of why uber shaders are such a stupid maintenance nightmare. Everything conflicts with everything else. I'd much rather see fog applied in a separate post-processing shader with the EffectCompositor. Although, the post-processing method won't work well for alpha-blended objects, so you'd probably want to apply the flora optimization mod first. Edit: I words.
Yep that did it. Any reason why it doesn't work in a data folder like lysol's texture mods do?
Because shaders are (currently) engine resources that are not really meant to be meddled with by the end-user, at least not yet. (as is handily demonstrated by the fact that your changes become incompatible with every other version)
Last edited by scrawl on 09 Jan 2018, 14:42, edited 1 time in total.

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

Re: [patch] new fog shader

Post by raevol » 09 Jan 2018, 02:42

scrawl wrote:
09 Jan 2018, 02:36
Because shaders are (currently) engine resources that are not really meant to be meddled with by the end-user, at least not yet. (as is handily demonstrated by the fact that your changes become incompatible with every other version)
Haha makes sense.

Chris
Posts: 1500
Joined: 04 Sep 2011, 08:33

Re: [patch] new fog shader

Post by Chris » 09 Jan 2018, 12:37

scrawl wrote:
09 Jan 2018, 02:36
I'd much rather see fog applied in a separate post-processing shader with the EffectCompositor. Although, the post-processing method won't work well for alpha-blended objects, so you'd probably want to apply the fauna optimization mod first.
Given things like water, particle effects, screen overlays, and chameleon, I don't think making fog a post-process would work well. At best it could be a post-opaque screen shader, though translucent objects would still need to have fog applied when rendered.

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

Re: [patch] new fog shader

Post by visvaldas » 11 Jul 2018, 20:16

Hi!

I'm sorry for the long radio silence.
The code still needs some cleaning up - here is what I have so far:

https://gitlab.com/vrresto/openmw/tree/ ... er-cleanup

It also should be rebased against master I guess.
Not sure when I'll have time for it - so feel free to step in ;)
Last edited by visvaldas on 11 Jul 2018, 20:30, edited 1 time in total.

DJBeardsquirt
Posts: 4
Joined: 10 Mar 2016, 23:14

Re: [patch] new fog shader

Post by DJBeardsquirt » 11 Jul 2018, 20:21

visvaldas wrote:
11 Jul 2018, 20:16
Hi!

I'm sorry for the long radio silence.
The code still needs some cleaning up - here is what I have so far:

https://gitlab.com/vrresto/openmw/tree/ ... er-cleanup
How's it looking? Any new screenshots?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests