GithubHelp home page GithubHelp logo

openmw-shaders's Introduction

Zesterer's OpenMW Shader Pack

Play Morrowind with beautiful shaders like it's 2022, not 2002.

Screenshots

Early morning in Balmora

Note that these screenshots were taken with additional mods installed, such as Morrowind Rebirth.

More screenshots An early morning view of Vivec The beaches and tidal pools outside Vivec Lanterns in the night outside Vivec Inside a building in Balmora A tavern in Pelagiad The grasslands outside Vivec on a misty afternoon

Features

  • Efficient: in my (very unscientific) tests, only a ~12% framerate hit compared to vanilla OpenMW shaders
  • PBR (Physically-Based Rendering) lighting model: surfaces reflect light consistently and realistically
  • Support for PBR textures (via specular maps): PBR texture mods correctly inform surface lighting
  • Improved sun light colours: dawn and dusk are red, midday is yellow, night is blue
  • Better ambient illumination: ambient light is omnidirectional scattered light from the sky, not direct sunlight
  • Brighter point lights: lights in the scene emit more light, illuminating the world in a more immersive manner
  • Underwater light attenuation: objects under the water shift towards blue with depth, adding realism
  • Underwater caustics: underwater scenes experience wavy lighting caused by surface refraction
  • Leaves sway in the wind: unfortunately, Morrowind has no realiable way to mark leaves so detection is imperfect
  • Sub-surface scattering: thin objects like grass and leaves allow bright direct light to scatter through them
  • Procedural detail for distant land: terrain in the distance maintains sharp details
  • Wave shader: Dynamic waves, froth, and backwash on beaches
  • Easy to configure: if you prefer realism over bright colours, you can tweak the shaders accordingly!

Installation Guide

  1. Download the shader pack.

  2. Locate your resources/ directory.

  3. Copy the extracted shader pack into resources/ (make sure to back up anything that was in there before doing this, should something go wrong). This should result in the following directory structure:

resources/
  |-- shaders/
  |    |-- compatibility/
  |    |-- core/
  |    |-- lib/
  '-- README.md
  1. Enable required settings
  1. Start OpenMW and have fun!

See the OpenMW Modding Guide for more detailed information about installing custom shader packs.

Download

This shader pack currently supports both development builds of OpenMW and OpenMW 0.48 (still in pre-release). I recommend using a development build of OpenMW if you can to get access to all of the latest funky features of both OpenMW and this shader pack.

Configuration

There are various presets and parameters that can be changed via shaders/lib/zesterer/config.glsl.

Recommendations

This mod works best with:

Known Issues

  • Morrowind's assets don't differentiate between 'leaves' and 'not leaves'. As a result, the shaders use a primitive heuristic to determine what is and is not a leaf for the wind sway effect. This can sometimes cause some objects that are not leaves (candle flames, banners, baskets, etc.) to exhibit strange swaying behaviour too. If this is too distracting for you, you can disable wind sway by setting WIND_AMPLITUDE to 0.0 in shaders/config.glsl.

  • On the version of the mod for OpenMW 0.48, objects reflected in water can have incorrect tinting applied to them. This is fixed in the version of the mod for OpenMW development builds.

Getting Help & Feedback

Got a question or a suggestion? Feel free to open a discussion topic.

Please note that I'm not responsible for whatever happens if you use this mod. Pretty much all settings in config.glsl are safe to play around with, but if you somehow manage to make your graphics card explode by plugging in stupid numbers, that's on you.

License

The code in this repository is derived from the OpenMW vanilla shaders. Accordingly, the code in this repository is similarly licensed under GPL v3.

openmw-shaders's People

Contributors

abdusharif avatar dvdkon avatar zesterer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmw-shaders's Issues

Dunmer Stronghold texture around window is animated

I already know the response for this one, but I am putting it here for posterity ;)

There is a texture around the stronghold windows that is normally static but become illuminated and animated using the shaders.
image

Editing shaders/config.glsl Has (virtually) no Effect

Hello again!

Once again I want to say that I find your work here amazing. The increase in visual appeal just from installing this mod was immediately noticeable!

I noticed the shadows seemed to be quite dark by default, however, so I opened shaders/config.glsl in Notepad and tried tweaking some settings.
However, when I got back into the game I saw no difference at all. Just to confirm, I tried setting some values very high so it would be apparent whether there was any effect ingame (e.g. #define SATURATION_FACTOR 3.5). Again, no difference.

The only setting I could seem to get to do anything was WIND_AMPLITUDE . Setting it to a very high value had an obvious (and somewhat amusing) effect. However, the strangeness continued when I tried to disable the wind (#define WIND_AMPLITUDE 0.0). At 0.0, the foliage continued to sway at a fairly noticeable amplitude.

Again I could certainly be doing something wrong.

This is on the latest development build of OpenMW (downloaded this morning).

Candle flame orbiting candles.

OpenMW version 0.48.0 Revision: 7038b32bdd

With the default shaders, the candle flames on candles stay where they should. With these shaders, it "orbits" the candle instead. Noticed this in one of Vivec's cantons.

Issue With Map / Inventory

Using any version of the shaders yields a strange issue: when facing roughly east to south-west-west, the paper doll in the inventory is darkly illuminated and any cells entered will likewise appear dark on the map. When facing the opposite direction (about a 180 degree field), the paper doll is brightly illuminated and the map appears bright, but has some strange artifacts when zooming in. Disabling the per-pixel lighting shader removes the issue, and the issue does not appear when using default OpenMW shaders.

As you can see in the screenshots, looking north yields a bright paper doll and looking south makes it dark. The bright cells on the map were the result of traveling to the north (while the paper doll would have been bright), and vice versa for the dark cells.

screenshot000 - Copy
screenshot001 - Copy
screenshot000 - Copy (2)

Shader initliazation issue with new build of 0.49

Had to reinstall OpenMW 0.49 for a mod, so I went to the OpenMW website and downloaded the build from Development Builds for Windows. Now whenever I try using this shader pack, it says "failed initializing shader: fullscreen_tri". With my very limited coding experience (still learning), I have done my best to see what could be wrong, but I'm too dumb to figure it out.

License?

What is the license for these shaders and could a LICENSE file be created?

Link to OpenMW 0.48 RCs to avoid user issues or possible future conflicts

Since OpenMW 0.48 testing period has kicked off for a long while now, the development branch has been building up in terms of bug fixes and features and may sooner or later make saves on development builds not backwards-compatible so a user may get locked on them when the shaderpack may only work on 0.48, if you plan on supporting only development builds then please ignore this.

0.48 has been tested alot and it has been rather stable, here's a forum page which has RC builds links:
https://forum.openmw.org/viewtopic.php?t=7486&start=120

Sun white flashing circle

Unfortunately I am experiencing an issue where the sun presents as a white flashing circle.
Please see this video where I try different view points with the sun behind/not behind buildings and different Volumetric Cloud & Mist Mod settings.
https://www.youtube.com/watch?v=vT57I3ua110
I confirmed it's not the Volumetric Cloud & Mist Mod settings by disabling it in the Postprocess HUD.
2022-08-25 19-11-15.webm
Double confirmed by uninstalling the mod by removing the data = line in openmw.cfg
https://www.youtube.com/watch?v=sAC3VfFcSa0

OpenMW 0.48.0 0a16d54865
openmw.log (corresponds to video "Double confirmed")
openmw.cfg: https://pastebin.com/EKzHZEd5
settings.cfg: https://pastebin.com/S6hthaws

GTX 1650 Max-Q with studio driver 516.94
16GB RAM
i7-10750H
Windows 10 Home 21H2

Texture/Shadow Flickering on Banners, signs and foliage.

I get an odd flickering effect as soon as I install the Zesterer Shaders.
You can see the flickering on foliage, Banners, Signs and on shadows under the eaves of buildings.
This doesn't happen with Wazabears shaders or the default shaders.
I am running the latest dev build (a42d09f366) and Zesterer shaders.
Attached video shows the issue,

Base.Profile.2022.09.04.-.07.31.07.01.mp4

Issue with Pixel lighting effecting

I've got the game pretty much Vanilla, been testing the shaders and ran into this issue, I did a bit of experimenting and found it only affects enchanted items when pixel lighting is on.

Glitch
glitchy
compare

Ruins aren't rendering correctly

There are those ruins from a Total Conversion mod that works well with the original OpenMW's shaders but are bugged with those shaders, their "ori" command output:

Content file: 1 [MA_RoK_Eng v0001.esm]
RefNum: 21135
RefID: ex_br_ruine
Memory address: 0x79e7aeaf10
Cell: Skalgrin Forest
Grid: 0 -12
Coordinates: 4284.05 -94596.2 1096.87
Model: meshes\ruine_test.NIF
(BSA: /storage/emulated/0/Morrowind/Data Files/marok.bsa)

Original shaders:

vanilla

Those shaders:

zesterer

The mod can be downloaded from here:
https://www.moddb.com/mods/myar-aranath-rellict-of-kallidar

R-Zero's Enlightened Flames (adapted by Wazabear) have untextured billboards

Candle meshes with attached flame billboards are not rendered properly with these shaders enabled -- the flames are "animated," and exhibit the behavior of billboards by facing the player, but appear completely black. This issue does not occur with OpenMW's "stock" shaders, and has been tested with and without post-processing.
If this can be fixed, Wazabear's patcher would be a good solution to the "candle-orbiting flames" problem caused by the sway effects.

Change Required following update of Development Build?

Hi Zesterer

Great mod which I have used on an older openMW development build. I have just trued reinstalling on build 76cba95a44 (from 3 days ago) and then tried installing the openmw-shaders and it was not recognising. Some basic investigation has indicated that the file structure under resources/shaders directory has changed. where as before all the files were under the shaders directory there is now 3 directories 'compatibility', 'core' and 'lib' with all files now in those directories.

Can you please confirm that this is the issues and what is required to updated this mod.

Thanks

Optimize swaying leaves feature

Swaying leaves feature contribute to the shaders performance hit and would be nice if leaves (or any affected objects) don't sway if they're beyond a selected distance (preferably made optional), if possible.

Possible specularity issues

I think getLightPbr is receiving point light vectors unnormalized, so specular reflections for highly reflective flat surfaces are in the wrong place as you move around relative to them.

Also, I think the light attenuation (from lcalcIllumination) is only supposed to apply to the diffuse component, but right now it affects both, so the reflective sheen of lights against near-parallel-to-view surfaces is basically cut off in a radius around them.

Also, I'm not sure where the fresnel term is used; I don't know what I'm doing, but poking around on google and trying to make sense of getPbr, I think it should be fed into kSpec and the default base reflectance should be 0.04? Doing that as-is, since the pbr shader currently operates in sRGB, doesn't look right, but if I make the shaders do everything in linear light, then a base reflectance of 0.04 and feeding the fresnel term into kSpec looks somewhat vaguely like what I would expect from having messed around in godot. (And making kDiff exactly 1.0-kSpec, because I think that's how energy conservation works? Not sure.)

Also, not specularity-specific, but everything is done in gamma-compressed sRGB right now (as opposed to linear sRGB), which is probably where all the problems in the comments about lights getting overblown are coming from.

Extremely dark shadows in interiors

The title says it all really. I am seeings that in a lot of the interiors around seyda neen (and other buildings i have been to) have this weird shadow effect going on where it over darkens spots while leaving the rest of it untouched. increasing interior brightness does nothing against it and i know its the shaders as when i go back to the default openmw ones it doesn't exist. I love these shaders simply because of the water caustics and underwater stuff; however, interiors are buggy as all hell for me. I have installed the shaders to a custom resources folder and have the game directed to that. clamp lighting is off and force per pixel lighting is needed to be on otherwise the shaders dont work.

below is an image showing exactly what im talking about. As you can see the npc off to the right is borderline impossible to see. this effect happens in some corners of homes/buildings and some dwemer ruins are borderline hard to see around.

openmw 2022-10-18 00-43-32

Light attenuation not simulated for water

From discussion with Zesterer on OpenMW Discord:

Light attenuation for particles like mud are not simulated correctly by the PBR shader, leading to "electric blue" water, often with very high occurrences of greens and bright blues. See screenshots:

screenshot033

screenshot018

Support TES3MP

Hi there,

First off, thanks for making such an excellent set of shaders.

Second, apologies if I've made some kind of nooby mistake here.

I've installed the shader pack following the instructions, but I seem to get an error with water:

Base Profile Screenshot 2022 12 14 - 13 44 00 52

I'm using OpenMW & TES3MP. No other mods were installed when I ran into this issue.

Interestingly, I couldn't open the F2 menu mentioned in the installation guide, and I believe this might have something to do with F2 being bound to hiding the chat in TES3MP?

Many thanks for any input, and again, thanks for making such a great shader pack.

Sun flashing behind foliage

Using shaders (default settings) the sun flashes as it passes behind foliage. See attached video.

2022-08-14.22-39-23.mp4

The problem is not present using default shaders. Using openmw I built today (commit 16922f80). Also using the volumetric clouds shader but turning that off doesn't impact the issue.

Shaders dont work like intended

Water does look weird. Other Shaders besides shadows do not seem to work.

I use OpenMW 0.47.0 with Steam Version of Morrowind.

I use a Laptop with Nvidia Prime (Geforce 3050 rtx Laptop AND build in CPU Graphics)
Arch Linux, newest Kernel.

I had to create a shaders folder in the existing resources folder (I did not replace any shaders in the process)
/usr/share/games/openmw/resources/shaders/

Example screenshot of permissions attached. All files in shaders/ have the same permissions.

Screenshot_20220527_085357
Screenshot_20220527_085431
Screenshot_20220527_085603

Lesen = Reading
Schreiben = Writing
Benutzer = User
Gruppe = Group

If needed, I will provide more Screenshots later!

Conflict- Frame Rate Drain with Remiros' ground Cover mod.

Appears that Remiros' Ground Cover mod conflicts with the shaders within this mod. The groundcover gets an extremely darkened appearance and tanks framerate in nearby area. I tried all the shaders pre-config options except for Custom.
screenshot016

Using latest Developmental OpenMW build - 3f6b33820a. Windows version.

Adding additional detail: This is not due to groundcover plug-ins activated. They are not activated. Just enabled in the config file.

Was also running Glassman's omwfx-shaders, and openmw-volumetric-clouds.
System Specs:
AMD Ryzen 7 5700G with Radeon Graphic 3.80 GHz, 16GB ram, GeForce 3060 Ti

Not working properly

I don't know what I do wrong, but shaders not working properly. Water is flickering, sometimes completely black, without reflections. Shadows are completely gone. 0.47.0. I replaced original shader folder with your shader folder, enabled per-pixel lighting and disabled light clamping.

Shadows not rendering properly

I'm sure it's an issue on my end, but I can't get shadows to show up when using this shader, making things look really bright and unnatural. I'm using OpenMW 0.49
Here's the default shaders. Note the shadows under the tree, and the terrain shading.
Default

And here's this shader. There's no shadows under the trees, and the landscape looks like an extremely bright, unlit/shadeless texture.
Zesterer

Here's my settings as well as cfg. I don't think there's anything wrong, and I simply copy/pasted the shader settings into the resources folder as instructed (overwriting when asked).
Settings

I'm not sure what the issue is, but I know that shadows should be present, as they look like they are in the preview images on the github for these.
Speaking of the example images, I don't think the bloom is working either, as none of my lanterns glow like in this example.
68747470733a2f2f692e696d6775722e636f6d2f72625243575a4f2e706e67

Thanks!

Night Eye and Light spells don't work

The Nighteye and the Light spells make no effect. Everything is the same as it was before the spell was cast. This applies to any items or potions with nighteye or light as well. Im running the I heart vanilla mod list among some other small mods on version .48, and after some tinkering, I've isolated it to this shaders. If there is a fix for this, PLEASE let me know, because I really like these shaders!

"Alpha Mask" Sways Independently of Opaque Foliage Texture with Wind Effect

I mentioned in #12 that the foliage continued to sway after I set WIND_AMPLITUDE to 0.0. On closer inspection, I realized that at this setting, the opaque part of the foliage textures (the leaves themselves) are actually not swaying; they are stationary as they should be.

However, the "alpha mask" (I'm not sure if this is the correct term or not; I'm referring to the outline around the opaque part of the foliage textures that defines the border where transparency should end/begin) was still swaying, creating a strange visual phenomenon:

2022-06-28.10-20-00.mp4

Notice how the "alpha mask" moves around while the actual leaves stay still in space. The "alpha mask" often overlaps the leaves, causing those portions to turn momentarily invisible. Simultaneously, the other end of the mask moves noticeably beyond the edge of the leaves, creating an obvious and animated "hole" in the mist/clouds from the Volumetric Cloud & Mist Mod.

After observing this, I tried setting WIND_AMPLITUDE back to 0.6 to see if the issue was noticeable there as well. I found that it was; while the leaves also move at this value (in addition to the "alpha mask"), they seem to do so independently of the mask, such that the two often visibly move in different directions from one another:

2022-06-28.10-14-59.mp4

The effect is rather visually distracting in my opinion.

Cannot get it to work

I unzipped the file in to my resources folder and launched the game. This is using the 0.48 dev build. I see no difference at all. I then go in the config file and replace the "#define PRESET ZESTERER " with "#define PRESET ZESTERER 2" to try to get the "Colorful and intense fantasy lighting" and it relaunch the game and it looks the exact same still. I am not sure what I'm doing wrong?

Thanks!

Not sure what I did wrong - not working

I'm running GOG GOTY, OpenMW 0.48.0 RC (official from OpenMW home page) and this is what it looks like in-game:
screenshot000

I followed the installation instructions—install to resources/shaders; enable per-pixel lighting; disable light clamping. Did I miss something?

Textures turning dark and very contrasted

After playing for some time, textures started turning very dark and contrasted, including the ui map textures. New game and shaders reinstall doesn't help, issue is the same on 0.48 and 0.49. Map and groundcover are most affected, with grass turning practically black and tiles on the map changing tint and brightness with each cell load.
screenshot002

Sky blending broken

screenshot001
No matter how I tweak the settings (both shaders' and openmw's configs) the clipping plane is clearly visible as the sky blending blends with gray instead of blending with the sky. All installation steps were followed thoroughly and checked many times - just wouldn't work no matter how hard I try.

Possible Licensing Issue

It appears that the caustics noise functions in lib/zesterer/rand.glsl are taken from this Shadertoy: https://www.shadertoy.com/view/3tlfR7

The Shadertoy is licensed with Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License, which is incompatible with the GPLv3 license stated in the readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.