[MOD] ShaderMod, glow boosts and soft shadow approximations.

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

[MOD] ShaderMod, glow boosts and soft shadow approximations.

Post by JonMicheelsen » Tue, 2. May 23, 15:25

How to install:
  • Download by clicking the green "Code" button and select the "Download Zip" button.
  • Go to your root X4 Foundation install folder. In Steam you can right click the game icon and under "Manage" you can select "Browse local files" to find the root install folder, and in that you find "extensions".
  • Open the ZIP file. In it you find the autogenerated "jm_x4_shaders" folder, drag that folder into the "extensions" folder.
  • If github has a branch named attached to it like "jm_x4_shaders-main", remove that from the folder name, or the shader files wont compile!
  • Once in game in the main menu go to Extension and make sure "Shader Improvements" is on, and then you are good to go!
The mod adds more work for the gpu, so if you have to run low graphics settings to play it, perhaps it's not for you - but it still does its things on all graphics quality settings - perhaps later I will setup presets to work along with Egosofts quality settings, but for now I haven't!

Features for now:
  • Screen space shadows, short range near, where the vanilla shadows have gaps some times and far range at the distance where the vanilla shadows fade away.
  • Massive work on multiple fronts to reduce specular aliasing!
  • Various refinement of how SSAO is applied, as well as how SSAO is calculated.
  • New retroreflective diffuse model - for ambient and most analytical light types.
  • Flexible subsurface model with epidermal/subdermal specular and scattering approximation. Still very WIP.
  • Fake soft shadow approximation on all light types - relies on SSAO to be on!
  • Global glow remap and boost, to make even the smallest lights bloom a tiny bit, without completely exploding the large ones
Latest changes:
  • SSAO polish.
  • Glow tweaking.
  • Fixed reflection probes that was accidentally broken in a previous version.
  • Performance improvements of screen space shadows and further tweaking of both near and far parameters giving better coverage in both cases.
Screenshots of the latest changes:
Near future WIP:
  • Improve Geometric Area lights, that are currently the culprit behind most lighting wonk.
  • Look into refining species specific subsurface profiles.
  • Look into baking and adding some generic subsurface depth textures.
  • Eye shaders
  • Hair shaders
Potential Down the line things I'd like to try:
  • HBAO+ style ssao, would probably look nicer and would improve shadow aproximations.
  • Some form of simple dynamic SSGI, would add a lot to visuals on stations/ships with potentially little impact in space combat where you really want the fps
  • Per triangle culling of things you can never see might improve performance greatly, a ton of base pass is wasted on this every frame, investigate if there's a relevant method that is viable with what's available
  • Planet shaders, visuals could be raised quite a bit here I think
  • Backdrop shaders, visuals could be raised quite a lot here I think

Original first post:

I've been exploring the shader pipeline a bit.
I've add a fix for what I believe to be a bug in the specular math and I've added some gentle tweaks to the PBR in general, as well as implemented a new feature; screen space far shadows. I plan to make this into a mod eventually. In that context I have some questions.

But let's start with some examples!

Screen Space Shadows is a cheap dynamic shadow solution, that in a game like this works great at distance, but wouldn't work great up close for anything else. It works particular well as an extension to the PCF Cascade shadows already in the game, that are great up close but unfeasible at long distances and thus fade away, causing shadow popping when ever you fly towards something. It also doesn't have a draw call overhead like the cascade technique does, making it quite cheap regardless of number of shadow casters on screen. In game it looks like this. Note the low FPS is from the capture software I used!
https://cdn.discordapp.com/attachments/ ... adows2.mp4
Debug mode: Red and green are pixels on screen evaluated, green is the actual shadow cast. Blue is the games default PCF Cascade Shadows. The two fade seamlessly into each other, greatly reducing shadow popping.
https://cdn.discordapp.com/attachments/ ... G_MODE.mp4

To show the other changes, I've implemented a split screen compare mode. The left half of the following screenshots is Vanilla, the right half is the gently tweaked code.

There is what I believe to be a bug in the geometric attenuation shader code for the geometric analytical lights, where when normal mapped surfaces in the case where the pixel normal shows the backside relative to the camera view direction, a bright pixel wide grazing artefacts occurs, particular noticeable in dark areas, which leads to a very noisy image, when there is repeating or high frequency normal mapped surfaces:
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png

In addition I've added a roughness remap function, an old Pixar trick, that gently raises the smoothest surfaces towards less mirror like while simultaneously gently enhances range utilization of the high end of the roughness(or low end of smoothness). This reduces the wet feeling some scenes in the game has, while also making dull surfaces a little more interesting. Note the above grazing angle fix is also on here.
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png

As you can see, these are extremely subtle changes, since I don't intend to drastically change art direction and artists works - or mess with custom textures from mods - but rather enhance the image rendered.

So to questions!
All these new features are currently controlled with a set of #define's in common.h. Is it possible to expose these, one way or another, through some custom interface and make some of them runtime modifiable in game?
Is it possible to make the game hot reload shaders?
Is it possible to get shader compiler error and warning logging on shaders somehow? [The challenge is already fun, but it doesn't have to be that hardcore :twisted:]
If I wanted to go a little wilder, is it possible to assign some global textures, not specific to material definitions? [Some very complex lighting models can be baked to lookup tables]
If I want to go really wild, is it possible to add new render passes to the pipeline, with control of what buffers goes in and out? [If I wanted to take a shot at for example http://www.iryoku.com/separable-sss/]
What is the best way to make this a stand alone mod? [Currently I work off the shader folder being extracted to the root X4 folder]

Next things I'm probably gonna look at is improving the diffuse lighting models to get the non metals to stand out a bit more, and after that I may take a shot at improving character skin rendering.
Last edited by JonMicheelsen on Mon, 19. Jun 23, 12:08, edited 24 times in total.

Mr.Freud
Posts: 302
Joined: Sat, 16. Nov 13, 20:20
x4

Re: Screen Space Far Shadows and More [Mod WIP]

Post by Mr.Freud » Tue, 2. May 23, 15:52

Looks really good! Could you also make a mod that increases normal shadow distances?

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: Screen Space Far Shadows and More [Mod WIP]

Post by JonMicheelsen » Tue, 2. May 23, 16:03

Mr.Freud wrote:
Tue, 2. May 23, 15:52
Looks really good! Could you also make a mod that increases normal shadow distances?
Short answer is no, longer distance would mean lower quality while also being more expensive.

User avatar
Dj_FRedy
Posts: 229
Joined: Mon, 27. Jun 11, 05:58
x4

Re: Screen Space Far Shadows and More [Mod WIP]

Post by Dj_FRedy » Wed, 3. May 23, 05:40

JonMicheelsen wrote:
Tue, 2. May 23, 15:25
All these new features are currently controlled with a set of #define's in common.h. Is it possible to expose these, one way or another, through some custom interface and make some of them runtime modifiable in game?
Is it possible to make the game hot reload shaders?
You're talking about specialized development tools, which we don't currently have yet, except for blender's object tools which are still in their early stages of development.

I also haven't seen anything that points to something like a GUI or possible way to create one for the game, communicating with the shaders is out of reach for modders in this sense, but I guess it exists internally (EGO), and I hope for the sake of the person responsible for handling the shaders, that they have a way to update, refresh, reload, change parameters on hot and see the result.
You can type '/help' in the in-game chat and see in the output debug file, if you have debugging enabled, the available commands that can be queried, among which there is none that can be used to reload shaders.

effect of shaders on planets: https://youtu.be/XeYbb0hf10U?list=PLRNr ... 0Vem&t=245
Is it possible to get shader compiler error and warning logging on shaders somehow? [The challenge is already fun, but it doesn't have to be that hardcore :twisted:]
Here I commend myself to my creed: One does not speak unless one knows.
If I wanted to go a little wilder, is it possible to assign some global textures, not specific to material definitions? [Some very complex lighting models can be baked to lookup tables]
If you mean making changes to 'material_library.xml' you can create your own material definitions or diff the ones you see fit.
If I want to go really wild, is it possible to add new render passes to the pipeline, with control of what buffers goes in and out? [If I wanted to take a shot at for example http://www.iryoku.com/separable-sss/]
My creed forbids me to comment or respond to this as well.
What is the best way to make this a stand alone mod? [Currently I work off the shader folder being extracted to the root X4 folder]
I assume you are using the 'prefersinglefiles' launcher command at the moment to load your changes. If I wanted to remove the command and still keep my changes I would create a 'my_shaders_mod' extension, pack 'common' keeping the original folder structure and create with the 'XRCatToolGUI' tool a catlog with the name 'subst_01'. This would be the way to tell the game to use the file 'my_shaders_mod/../common' instead of the original file, as does the launcher command.
To use my own shader files I guess I would use an '#include' inside 'common', although the root directory of the game would be the place to put these new files keeping the structure: 'shadergl/shaders/my_shaderfile', if I want something more tidy: 'shadergl/shaders/my_custom_shaders/my_shaderfile'.

I experimented a bit with the vertex and pixel shaders from Mount&Blade Warband, I really had to learn some hlsl from scratch to be able to implement some changes I wanted to make to the game, in X4, regarding shaders, I'm a bit out of my zone comfort, plus I've forgotten most of the things I learned lol. I see things that I don't like and it's the shaders' fault, but I haven't reached the point of researching and modifying yet.
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: Screen Space Far Shadows and More [Mod WIP]

Post by JonMicheelsen » Wed, 3. May 23, 10:58

Dj_FRedy wrote:
Wed, 3. May 23, 05:40
You're talking about specialized development tools, which we don't currently have yet, except for blender's object tools which are still in their early stages of development.
Sorry #define wasn't really laymen's terms. A #define directive is a way to make the shader compile in different ways, depending on what is defined or not, or what it is defined as, in case of a variable. The way I've set them up I can control all my changes from just one place, even though I have changes in multiple shader files. Some of these #defines could be non-compile time, global constant buffer variables - the same way for example the sun direction and color in a system is piped in at runtime, which would be beneficial to be able to tweak things in game - or just not make it a black box for users in the future. So I guess what I'm asking is actually, can I add to Vanilla graphics settings, and if not, can I make my own in game mod menu that can set const buffer variables?
[/quote]
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
...refresh, reload, change parameters on hot and see the result.
Hot reloading is usually implemented as a form of file monitoring, where a change to a file is registered and kicking of a recompile of said files. To save resources this is usually hidden behind some dev console switch. So my question, is there something like that, or is that an actual dev build internal to Egosoft. I'll try and check out '/help' later.
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
effect of shaders on planets: https://youtu.be/XeYbb0hf10U?list=PLRNr ... 0Vem&t=245
Hehe, nice to get some faces on them, see their names in comments in the code :)
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
If you mean making changes to 'material_library.xml' you can create your own material definitions or diff the ones you see fit.
I'll check that out later too.
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
I assume you are using the 'prefersinglefiles' launcher command at the moment to load your changes. If I wanted to remove the command and still keep my changes I would create a 'my_shaders_mod' extension, pack 'common' keeping the original folder structure and create with the 'XRCatToolGUI' tool a catlog with the name 'subst_01'. This would be the way to tell the game to use the file 'my_shaders_mod/../common' instead of the original file, as does the launcher command.
I'm not actually. I just unpacked the shadergl with its file structure intact into the game folder, and that was all I needed to be able to change things. A modder on the discord told me of the method you mention I believe, I have yet to try it out, for now it would be an extra step for every little change.
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
To use my own shader files I guess I would use an '#include' inside 'common', although the root directory of the game would be the place to put these new files keeping the structure: 'shadergl/shaders/my_shaderfile', if I want something more tidy: 'shadergl/shaders/my_custom_shaders/my_shaderfile'.
I will have to change core files, but it would be nice to perhaps keep all my new functions and #defines in my own file, I'll try that later. This I could have just tested out myself, sorry. :oops:
Dj_FRedy wrote:
Wed, 3. May 23, 05:40
I experimented a bit with the vertex and pixel shaders from Mount&Blade Warband, I really had to learn some hlsl from scratch to be able to implement some changes I wanted to make to the game, in X4, regarding shaders, I'm a bit out of my zone comfort, plus I've forgotten most of the things I learned lol. I see things that I don't like and it's the shaders' fault, but I haven't reached the point of researching and modifying yet.
Cool! I was contemplating modding Bannerlords instead, since all its shaders are exposed too, but the space urge tingled the strongest :D I do HLSL on a near daily basis at work, as a Technical Artist, so I'm very familiar not only with the kinds of code structures I'm looking at, but also with PBR on the nitty gritty math level. I might have some more pictures later, yesterday I upgraded the diffuse lambert model to the very modern one found here https://advances.realtimerendering.com/ ... InWWII.pdf, that UE5 also happens to be using, which makes non metal surfaces have more life.

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: Screen Space Far Shadows and More [Mod WIP]

Post by JonMicheelsen » Thu, 11. May 23, 01:59

Update time!
First some some screenshots of how it currently looks:
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png
https://cdn.discordapp.com/attachments/ ... /image.png

Want to take it up for a spin? Here you go!
https://github.com/JonMicheelsen/X4FoundationShaderMod
The zip can just be extracted to the extension folder, with it's file paths intact, and you'll be good to go.
Consider this a soft launch, I'll be pushing to it as I go.

Tweaks and controls can be found in jon_mod_defines.h, you'll have to repack the cat file yourself.

Retroreflective diffuse now fully and proper implemented, both for all types of direct analytical lights and for all forms of ambient lighting.
Various minor tweaks to direct analytical lights.
Pretty much all ambient lighting code rewritten. Added refinements to ambient specular occlusion and ambient diffuse occlusion.
Near soft screen space contact shadows are now in. It smoothly closes the caps on the regular shadows.
Far shadows now also fully implemented. They likewise smoothly automatically fill in when the regular shadows fades away.
Various polite tweaks to Egosoft code, with focus on improving fidelity.
Basis for passing more variables from basepass to deferred rendering now added - but not yet hooked up to anything.

Up next, in whatever order I'm in the mood for:
Subsurface Scattering
Character skin.
Eye rendering
Artefact free normal map mirroring.
More analytical lights improvements, in the area of shadowing.
Multiscatter GGX approximations.

References:
Retroreflective diffuse: https://advances.realtimerendering.com/ ... InWWII.pdf
Ambient occlusion improvements: https://iryoku.com/downloads/Practical- ... lusion.pdf
Screenspace Shadows: https://panoskarabelas.com/posts/screen_space_shadows/

Also, if Timon, Florian or Markus swings by, I'd love to ask you guys a few questions, in the area of buffer layouts and custom render passes, that I'm pretty sure only you can answer. Though it's fun to dig, it might save me some time!

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Thu, 11. May 23, 04:47

Pretty sure markus left and i think is at star citizen now.

Be nice if ur tweaks fix the spec issues that show up as shimmering on stuff like stations at a distance, and stuff when on stations, one of my pet peevs i cant stand and tried to show ego how to fix it but they didnt listen to the topic when i showed examples it could be done by fixing the shaders or implement txx.

Also whoever let characters have lighting that strong on the skin lol, that defo needs fixing how anyone can look at characters and not notice how strong light affects em and wince i dunno lol. Real ppl dont look like that with light on them.

Tried to show em this, dunno if it helps with ur mod.
viewtopic.php?p=5012389#p5012389
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Halpog
Posts: 432
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [MOD] ShaderMod, now with soft release!

Post by Halpog » Thu, 11. May 23, 05:53

i tryed it and after 2 mins , tears startet to run .. and i had to close the game because my eyes was hurting.
why ? because first, my FPS dropped down to 12 FPS in the game. no matter where i was, or what i did.playing , flying, aiming nothing was possible.

this kind of shader rework looks nice yes. but it also proofs that the mechwarrior 5 effect is real.
dunno if u know this game. but in mechwarrior 5 its the same. exactly the same.
every polygon on this grafik engine in MW5 was getting rendered in realtime.
after 2 mins ppl stopped playing because noone could take it and look at it untill they delivered a patch
to smoothen the textures and making them more "mixed , washy, unsharp ... dunno how to explain it.

i have glasses, and a mod liek that is realy nice but for a person like me, not usable. our eyes start to tearing and flickering, and zooming everytime we see
a new texture
at least for me it is like that.



but keep going with the mod it looks awesome

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: [MOD] ShaderMod, now with soft release!

Post by JonMicheelsen » Thu, 11. May 23, 08:49

Skeeter wrote:
Thu, 11. May 23, 04:47
Pretty sure markus left and i think is at star citizen now.
Ah, well, it was the three names I saw in comments in the code, the other two then. :)
Skeeter wrote:
Thu, 11. May 23, 04:47
Be nice if ur tweaks fix the spec issues that show up as shimmering on stuff like stations at a distance, and stuff when on stations, one of my pet peevs i cant stand and tried to show ego how to fix it but they didnt listen to the topic when i showed examples it could be done by fixing the shaders or implement txx.
That is exactly one of the things I've been working on reducing as well.
Skeeter wrote:
Thu, 11. May 23, 04:47
Tried to show em this, dunno if it helps with ur mod.
viewtopic.php?p=5012389#p5012389
Ah, the good old specular showdown in the wild west. That is unfortunately not particular applicable in this case, since it requires pre processed roughness mipmaps, and materials that then strictly uses those textures as is, without any roughness offsets or overlays - and that is not the case in X4 and really most games these days.

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: [MOD] ShaderMod, now with soft release!

Post by JonMicheelsen » Thu, 11. May 23, 09:04

Halpog wrote:
Thu, 11. May 23, 05:53
i tryed it and after 2 mins , tears startet to run .. and i had to close the game because my eyes was hurting.
why ? because first, my FPS dropped down to 12 FPS in the game. no matter where i was, or what i did.playing , flying, aiming nothing was possible.
What graphics card are you running on?
Halpog wrote:
Thu, 11. May 23, 05:53
but keep going with the mod it looks awesome
Thanks!

Update:
Pushed some shadow tweaks, after receiving some feedback on the Discord servers. There's a known issues where the depth the shadows sample are squished on some hardware, will look into it later.
If your screen space shadows looks all broken but you'd still like to check out the other things, you can go to jon_mod_defines.h and comment out line 33 #define JON_MOD_SSSHADOWS and repack the .cat file.

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Thu, 11. May 23, 15:06

Btw i had a go i got the zip, extracted it stuck it in extensions folder where the 2 dlc i have is, but the game wouldnt launch, once i removed it the game launches ok again (phew).

Did i mess up it was like

x4
-extensions
-- X4FoundationShaderMod-main
--- bunch of folder and files

on win 10 latest.
Last edited by Skeeter on Fri, 12. May 23, 02:41, edited 2 times in total.
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Thu, 11. May 23, 15:09

JonMicheelsen wrote:
Thu, 11. May 23, 08:49
Ah, the good old specular showdown in the wild west. That is unfortunately not particular applicable in this case, since it requires pre processed roughness mipmaps, and materials that then strictly uses those textures as is, without any roughness offsets or overlays - and that is not the case in X4 and really most games these days.
Ah shame, just if u see in that topic a modder did a fix for it for alien game as u could see it in a utube vid i thought perhaps a modder could fix it for x4 if someone clever enough with shaders had a go. Actually i remember a topic u made and u fixed the white specular bits on characters once with some screenshots showing it, i thought expanded on that for other stuff globally would have sorted it. Unless i was lookin at the wrong thing u were showing on the characters.
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: [MOD] ShaderMod, now with soft release!

Post by JonMicheelsen » Thu, 11. May 23, 18:26

Skeeter wrote:
Thu, 11. May 23, 15:06
Btw i had a go i got the zip, extracted it stuck it in extensions folder where the 2 dlc i have is, but the game wouldnt launch, once i removed it the game launches ok again (phew).

Did i mess up it was like

x4
extensions
long folder name
bunch of folder and files

on win 10 latest.
Did you extract it with the folder structure intact?
Can you tell me exactly what graphics options you're using, I have not tested it on many different settings yet. First time compile is probably a little longer than you're used to!

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: [MOD] ShaderMod, now with soft release!

Post by JonMicheelsen » Thu, 11. May 23, 18:28

Skeeter wrote:
Thu, 11. May 23, 15:09
JonMicheelsen wrote:
Thu, 11. May 23, 08:49
Ah, the good old specular showdown in the wild west. That is unfortunately not particular applicable in this case, since it requires pre processed roughness mipmaps, and materials that then strictly uses those textures as is, without any roughness offsets or overlays - and that is not the case in X4 and really most games these days.
Ah shame, just if u see in that topic a modder did a fix for it for alien game as u could see it in a utube vid i thought perhaps a modder could fix it for x4 if someone clever enough with shaders had a go. Actually i remember a topic u made and u fixed the white specular bits on characters once with some screenshots showing it, i thought expanded on that for other stuff globally would have sorted it. Unless i was lookin at the wrong thing u were showing on the characters.
Oh, but there are significant improvements to specular aliasing!! That particular method there, just ain't practical for the way the artwork is done!

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Thu, 11. May 23, 18:49

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <!-- graphic options -->
  <fullscreen>true</fullscreen>
  <borderless>false</borderless>
  <antialiasing>none</antialiasing>
  <colorcorrection>0</colorcorrection>
  <gamma>1.00</gamma>
  <capturehq>false</capturehq>
  <gfxquality>0</gfxquality>
  <!-- high gfx preset -->
  <shaderquality>2</shaderquality>
  <shadows>3</shadows>
  <softshadows>true</softshadows>
  <ssao>0</ssao>
  <glow>3</glow>
  <lodfactor>0.60</lodfactor>
  <effectdistance>0.60</effectdistance>
  <distortion>true</distortion>
  <disableradar>0</disableradar>
  <radarquality>1</radarquality>
  <ssr>true</ssr>
  <texturequality>high</texturequality>
  <!-- sound options -->
  <nosound>false</nosound>
  <volumetotal>1.00</volumetotal>
  <volumemusic>0.29</volumemusic>
  <volumevoice>0.75</volumevoice>
  <volumeambient>0.43</volumeambient>
  <volumeui>0.41</volumeui>
  <volumeeffects>0.54</volumeeffects>
  <!-- game options -->
  <subtitles>true</subtitles>
  <autosave>false</autosave>
  <autoroll>true</autoroll>
  <toggleboost>false</toggleboost>
  <togglemouselook>false</togglemouselook>
  <rumbleintensity>1.00</rumbleintensity>
  <aimassist>1</aimassist>
  <collisionassist>true</collisionassist>
  <controlmodemessages>true</controlmodemessages>
  <radarmode>false</radarmode>
  <stopshipinmenu>false</stopshipinmenu>
  <forceshootatcursor>false</forceshootatcursor>
  <fpusecameraforward>false</fpusecameraforward>
  <separateRadar>1</separateRadar>
  <speaktargetname>true</speaktargetname>
  <!-- input options -->
  <confinemouse>true</confinemouse>
  <gamepadmode>0</gamepadmode>
  <!-- online options -->
  <showvisitornames>false</showvisitornames>
  <ventures>true</ventures>
  <!-- privacy options -->
  <sendcrashreports>true</sendcrashreports>
  <!-- modified settings -->
  <chardensity>0.15</chardensity>
  <cockpitcamerascale>0.26</cockpitcamerascale>a
  <trafficdensity>0.1</trafficdensity>
  <presentmode>immediate</presentmode>
  <res_width>2560</res_width>
  <res_height>1440</res_height>
  <tobiifilterstrength>5</tobiifilterstrength>
  <sounddevice/>
  <ssrquality>medium</ssrquality>
  <highlightvisitors>false</highlightvisitors>
  <compress>true</compress>
  <chromaticaberration>false</chromaticaberration>
  <gpu>1</gpu>
  <showsignalleakviz>true</showsignalleakviz>
  <showlongrangescanviz>true</showlongrangescanviz>
  <volumetric>1</volumetric>
  <upmode>none</upmode>
  <pom>high</pom>
  <envmapprobes>high</envmapprobes>
  <useUserIDForCrashReports>false</useUserIDForCrashReports>
  <globallightscale>1.0</globallightscale>
  <envmapinsideglassfactor>0.00</envmapinsideglassfactor>
</root>
And yes i kept the folder structure.
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Realspace
Posts: 1365
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [MOD] ShaderMod, now with soft release!

Post by Realspace » Thu, 11. May 23, 20:36

I've the same issue, game's not launching. Could it have a conflict with Reshade? I've it in use.
My gfx is a readeon RX580

Code: Select all

  <!-- graphic options -->
  <fullscreen>true</fullscreen>
  <borderless>false</borderless>
  <antialiasing>none</antialiasing>
  <upmode>none</upmode>
  <presentmode>fifo_relaxed</presentmode>
  <colorcorrection>0</colorcorrection>
  <gamma>1.10</gamma>
  <capturehq>false</capturehq>
  <gfxquality>0</gfxquality>
  <!-- high gfx preset -->
  <shaderquality>2</shaderquality>
  <shadows>3</shadows>
  <softshadows>true</softshadows>
  <ssao>3</ssao>
  <glow>3</glow>
  <lodfactor>1.00</lodfactor>
  <effectdistance>0.50</effectdistance>
  <distortion>true</distortion>
  <disableradar>false</disableradar>
  <radarquality>0</radarquality>
  <ssr>false</ssr>
  <ssrquality>low</ssrquality>
  <texturequality>high</texturequality>
  <chromaticaberration>true</chromaticaberration>
  <volumetric>0</volumetric>
  <pom>medium</pom>
  <envmapprobes>none</envmapprobes>
  <envmapinsideglassfactor>0.00</envmapinsideglassfactor>
  <!-- sound options -->
  <nosound>false</nosound>
  <volumetotal>1.00</volumetotal>
  <volumemusic>1.00</volumemusic>
  <volumevoice>1.00</volumevoice>
  <volumeambient>0.80</volumeambient>
  <volumeui>1.00</volumeui>
  <volumeeffects>1.00</volumeeffects>
  <!-- game options -->
  <subtitles>true</subtitles>
  <autosave>true</autosave>
  <autoroll>false</autoroll>
  <toggleboost2>false</toggleboost2>
  <togglemouselook>false</togglemouselook>
  <rumbleintensity>0.65</rumbleintensity>
  <aimassist>1</aimassist>
  <collisionassist>true</collisionassist>
  <controlmodemessages>true</controlmodemessages>
  <radarmode>false</radarmode>
  <stopshipinmenu>false</stopshipinmenu>
  <forceshootatcursor>false</forceshootatcursor>
  <fpusecameraforward>false</fpusecameraforward>
  <separateRadar>true</separateRadar>
  <speaktargetname>true</speaktargetname>
  <autosaveintervalfactor>1.00</autosaveintervalfactor>
  <emergencyeject>true</emergencyeject>
  <mouseovertext>true</mouseovertext>
  <cockpitcamerascale>0.65</cockpitcamerascale>
  <!-- input options -->
  <confinemouse>true</confinemouse>
  <gamepadmode>2</gamepadmode>
  <tobiimode>combined</tobiimode>
  <tobiianglefactor>1.00</tobiianglefactor>
  <tobiigazeanglefactor>0.40</tobiigazeanglefactor>
  <tobiipositionfactor>1.00</tobiipositionfactor>
  <tobiideadzoneangle>0.00</tobiideadzoneangle>
  <tobiideadzoneposition>0.00</tobiideadzoneposition>
  <tobiigazedeadzone>0.10</tobiigazedeadzone>
  <tobiifilterstrength>5</tobiifilterstrength>
  <tobiigazefilterstrength>30</tobiigazefilterstrength>
  <!-- online options -->
  <showvisitornames>false</showvisitornames>
  <highlightvisitors>false</highlightvisitors>
  <!-- privacy options -->
  <sendcrashreports>true</sendcrashreports>
  <!-- accessibility options -->
  <showsignalleakviz>true</showsignalleakviz>
  <showlongrangescanviz>true</showlongrangescanviz>
  <globallightscale>1.0</globallightscale>
  <!-- modified settings -->
  <chardensity>0.50</chardensity>
  <trafficdensity>0.50</trafficdensity>
  <res_width>2560</res_width>
  <res_height>1440</res_height>
  <sounddevice>OpenAL Soft on Speakers (Realtek(R) Audio)</sounddevice>
  <gpu>0</gpu>
  <uiscale>0.9</uiscale>

JonMicheelsen
Posts: 33
Joined: Tue, 15. Aug 17, 22:08
xr

Re: [MOD] ShaderMod, now with soft release!

Post by JonMicheelsen » Fri, 12. May 23, 01:49

Did it show a black screen, or does it fail to even get to that?
I've tried to recreate both of your graphics settings and it works fine on my end.
I don't know about Reshade, never used it myself.

The latest version:
Fixes a lighting bug - direct sun diffuse light ran twice, one of them without shadows! :oops:
Screenspace shadows now works with SSAAx2
Various minor shadow artefacts removed.
Shadows should run roughly twice as fast now.
Ambient lighting now energy conservative.(fingers crossed)
Precalculated ambient light, that runs as you launch the game, now performs 25% of the numbers of samples compared to yesterday - which lower spectrum hardware could have had problems with...
Various other polish - mostly invisible debug modes for me to use :mrgreen:

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Fri, 12. May 23, 02:37

So i put the mod in the folder as stated.

Went to right click on steam icon to launch it from the list of recent played games list. It tries to launch but is stuck (not responding) but it shows the desktop but shows x4 blue mouse cursor which i can move over the desktop. I cant click anything on desktop tho id have to alt tab or task man for that. I have to end x4 in task man to get back to desktop since the game wasnt going to get any better from the state it was in.

btw why does clicking jonm shaders.zip keep opening up another identical stuff, and clicking the new .zip keeps doing the same thing i had like 3 folders full of the same stuff if i keep clicking through jonmshaders.zip.

So its like

x4
-extensions
-- X4FoundationShaderMod-main
--- shadergl
--- content.xml
--- jonm_shaders.zip (seems to contain lots of copies of the same stuff and some hidden git thing which one file says recieve emails or somit which im wary if some code is trying to access emails)
--- subst_01.cat
--- subst_01.dat
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Halpog
Posts: 432
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [MOD] ShaderMod, now with soft release!

Post by Halpog » Fri, 12. May 23, 05:48

JonMicheelsen wrote:
Thu, 11. May 23, 09:04
Halpog wrote:
Thu, 11. May 23, 05:53
i tryed it and after 2 mins , tears startet to run .. and i had to close the game because my eyes was hurting.
why ? because first, my FPS dropped down to 12 FPS in the game. no matter where i was, or what i did.playing , flying, aiming nothing was possible.
What graphics card are you running on?
Halpog wrote:
Thu, 11. May 23, 05:53
but keep going with the mod it looks awesome
Thanks!

Update:
Pushed some shadow tweaks, after receiving some feedback on the Discord servers. There's a known issues where the depth the shadows sample are squished on some hardware, will look into it later.
If your screen space shadows looks all broken but you'd still like to check out the other things, you can go to jon_mod_defines.h and comment out line 33 #define JON_MOD_SSSHADOWS and repack the .cat file.
iam running the game on a 2060

Skeeter
Posts: 3675
Joined: Thu, 9. Jan 03, 19:47
x3

Re: [MOD] ShaderMod, now with soft release!

Post by Skeeter » Tue, 16. May 23, 05:33

I downloaded the latest from github, edited the content.xml as dunno if it needs a specific name in there for the mod folder so matched it then added " instead ' at the top bit but dunno if was needed.

Still didnt load.

looked at the 2kb file and says about shader folders etc, but since the shader folder isnt there now presumably all in the 222k file i deleted the 2kb one and now it loads. BUT i dont think its working as still see noisy bits where i noticed before, i did notice that shadows were less harsh on the terran dlc intro screen when the big station comes into view after about 10s as that usually flickers the shadows.

So i dunno, ive never used mods in x games before, thought maybe u had to add a startup command in steam for mods to work but didnt find any, and faq on here just says shove em in extensions folder so just did that.

So for now it looks.

x4
-extensions
-- X4FoundationShaderMod-main
--- content.xml
--- subst_01.cat
--- subst_01.dat

(restored the cat file as probs needed but doesnt load if its there, I dont own the pirates dlc or the boron dlc btw.)

Also i have nothing extracted like cat files or whatever in x4 folder as i think modders do. Maybe thats why i dunno. Like i said first mod trying to get to work. Thought just a default install of x4 with split and terran dlcs on, nothing else in files or folders touched since steam installed it, and then put them 3 files with the folder in extensions in steams x4 folder.
[ external image ]
7600x cpu 5.4ghz 32gb DDR5 5600mhz 6700XT 32" 1440p mon

Post Reply

Return to “X4: Foundations - Scripts and Modding”