After what feels like an eternity I found a Can of Bugs be Gone to pour on the code, enjoy a new less glitchy v0.1.3!
Adds Screen Space Reflections (SSR) to glossy surfaces (mostly visible during the rain). Comes with a completely rewritten "optional" water shader (many might argue it's highly addictive and using it even once might make it mandatory).
Inspired by ReShade SSR but didn't like having to turn it on and off for the rain, then it got out of hand as usual.
Water Shader SSR
It should turn this:
Into this
Note that the effect is quite computationally intensive and as such it has been made optional. If you're having performance issues with the water shader enabled you can try to get more by changing the values in ssr_settings.h (has comments on what most of the stuff does).
Glossy Surface SSR
It should turn this:
Into this:
Includes patches for Beef's Shader Based NVGs and/or Enhanced Shaders PBR, I'll not be providing other compatibility patches unless I'll start using some other mod that requires one.
If you're using both Enhanced Shaders and Beef's NVG's then use ES PBR & BSB NVGs Patch (they both touch the same file), otherwise use the relevant patch if any (BSB NVG for Beefs NVGs and ES PBR for Enhanced Shaders).
Note
This should be obvious IMO but this will not work without DX11 and modern hardware or at least you might have massive performance issues if you aren't CPU bound.
Changelog
v0.1.3
Mainly fixing obvious visual artefacts from previous versions (probably added some new ones in the process).
- Added water intensity multiplier to control water murkyness
- Added more realistic specular shine to water (more, but still far from correct)
- Changed water normal offset to match weird water normal tilt closer
- Fixed water reflection artefacts when looking down by fading to env
- Fixed water specular shine being added to parts that don't reflect sky
- Fixed invalid reflections back toward camera
- Fixed likely shadowed water being too bright
- Fixed rays passing through/behind large objects
v0.1.2
Main change with this version is the addition of a completely rewritten water shader that fixes all the issues with the default one (basically nothing in that is working correctly) and adds screen space refractions and reflections among some other goodies.
- Added a new optional water shader
- Screen space reflections and refractions
- Fixed depth and distance fog
- Fixed water normals and specular
- Shoreline blending
- Added proper Fresnel calculation for better results
- Fixed screen space position to uv calculation
- Fixed reflections that ended up closer than where they started
- Fixed sky reflections being too dark and having visible step boundaries
- Fixed refine steps to use correct size based on number of refines instead of steps
- Changed glancing angle step extension to better catch nearby objects
- Changed initial step size to catch as much detail as possible with same step count
- Moved screen space ray traversal etc to own functions for reusability
- Merged in custom patch for undefined tonemap_hipri while using ES PBR & BSB NVGs
- Added many new debug and control defines to ssr_settings.h
v0.1.1
This version should make the effect much more visible during the day as well as hopefully fix the reported issues. If you're having issues with reflections on weapons then uncomment SSR_MIN_DEPTH in ssr_settings.h thou they should hopefully be tolerable now with the fixed lighting calculation. If on the other hand it seems that the effect isn't working at all then please try uncommenting one or more of the SSR_DEBUG defines in the same file.
- Fixed slight inaccuracy with screen space position reconstruction
- Fixed lighting calculation for reflected surfaces
- Faster screen space ray traversal (only reconstructs position during traversal)
- Added ssr_settings.h for easier tweaking of effect values
- Added SSR_MIN_DEPTH define to allow disabling the effect for surfaces too close to camera
- Added SSR_DEBUG_* defines for easier troubleshooting
Known Issues
- Beefs NVG outline gets reflected on water since it's added into the combine buffer
- Water foam is disabled while I work on a better version (not sure if it was ever enable before
*noice*
(buried)
i have tested it, but its already included in the enhanced shader mod;) you have to add real reflections from the environment ( all objects)... than its awesome;)
Have you and does it or are you just talking out of your ***? Last I checked it doesn't have SSR (at least the one released on moddb). Therefore I conclude that you're just talking out of your ***.
PS. The screenshots are with Enhanced Shaders without SSR and with SSR ;).
Sorry for anxiety on can explain how to install it
Sorry for anxiety on can explain how to install it
Sorry for anxiety on can explain how to install it
And to be slightly less assholish with the answer, you're probably confusing the Enhanced Shaders specular light reflections with what this mod does which can look similar in some cases however they're far from the same thing.
be cool that was no attack on you i mean it only to support you ;()
By talking BS about Enhanced Shaders already having SSR, yeah no I fail to see how that's support so you can keep it to yourself TYVM.
Woah, such toxicity, calm down there captain! Viking clearly meant no harm, perhaps he'd just confused something, it happens. Don't act like a child.
Sure mom
You're a ****
I was waiting for this very much!! Awesome!
(buried)
Открою вам страшную тайну-не все играют на R3, уточнять не учили?
Let me tell you a secret, not everyone speaks russian? And I'd have assumed it to be pretty self explanatory that if you want modern graphics then play with modern hardware etc but guess I'll need to clarify this yes.
Никого не ебет, что ты играешь на тостере
да, я на R4 играю например
Gonna try this out. It's really good to have a patch for Beef's NVGs AND Enhanced Shaders!
What are the correct values for specular and gloss factor?
Shouldn't really depend on them at least based on my testing, eg. the defaults should work fine as well as the values suggested by Aggressor ReShade.
Hello, just got this installed along with beefs shader based NVGs and enhanced shaders but I am not seeing much of a difference when this mod is active and when it isn't and I was wondering if it could be due to a mistake on my end.
Is this the correct load order for having beef and enhanced shaders installed with this?
Enhanced shaders color grading
Beefs shader based NVGs
Patch for beefs NVGs
Glossy surfaces SSR
Glossy surfaces SSR patch
If this LO is correct, would the problem be the fact that I am spawning in the rain to see the effects, would that be why SSR doesn't kick in?
Yes that should be correct assuming the SSR Patch is the ES PBR & BSB NVGs one and changing the weather from the debug menu should affect straight away. One thing that comes to mind is that the effect is barely noticeable unless it's dark since the environment lighting is usually much stronger than the reflection, that's on the list of thing to try to tweak.
Please check with w_storm1 and if you still don't notice any changes let me know and I'll try to sort it out.
ok, i tried to figure out, works if the SSAO is set on HIGH, this means that if you're using HBAO-HDAO and SSAO on low-medium the SSR won't work at all
I wanted to use HBAO without setting SSAO on high because it's pretty gpu intensive compared, if you can manage to do a fix would be great!
Thank you for the information, I'll see what I can do about it.
Sorry about the delay in reply, I turned on darker nights and tried what Reter did and it worked like a charm.
So far things are looking amazing and it's well worth the frames going from medium to high.
Anyway, thank you for the assistance and I will definitely be watching this to see how things develop.
AWESOME!
Hello I just downloaded and installed the mod since the screenshot looks great. However I don't see any difference ingame. I checked in debug mode against a bright light and wet asphalt in Rostok at 3:45 with weather stormy_1.
With and without the mod activated I only see some minor small white dots on the asphalt (I guess they're from the anomaly standard wet surface shader).
SSAO is set on high in the game visual options.
I am using Reshade. Could that conflict with your mod probably which results in no difference? Can I check somehow in debug mode / console if your mod is working currently?
Thanks for any help!
ReShade shouldn't directly interfere with the effect, I haven't tested others but works at least with Aggressor. I'd assume you have checked that nothing overwrites the mod? If so pretty much the only thing that comes to mind is some weird combination of graphics settings that again makes it disappear (have had to fix few of those already).
Sorry that I can't help more, if you manage to figure out what the issue is I'll try to fix it for the next version.
Please check the updated version and if it still doesn't seem to work then uncomment the following lines, set weather to storm1 and send me a screenshot.
// #define SSR_DEBUG_NO_REFLECTION float3(0, 0, 1)
// #define SSR_DEBUG_NO_HIT float3(1, 0, 0)
// #define SSR_DEBUG_HIT ray.dir
Nothing overwrites the mod. I'm using a mod manager to make sure.
Thank you for your answer and the update. I will check this evening and reply here again.
Seems to work now, however it is only be seen on very dark surfaces and with rain I believe. I don't know. I guess I'll wait a little longer for the Addon to develop. Good luck I will check here every now and then for progress. Looks promising
Impressive how did you implemented SSR without engine edits. Great job!
Applied Magic ;). The engine uses a deferred shading pipeline which basically does the final image lighting and coloring as a post process step, allowing me to relatively easily do screen space effects with more information than is available during normal post processing (eg. how glossy the surface is).
Hmm just noticed your name so I'd assume you know the above already xD.
Love the addon, but certain weapons became too shiny for me, on clear daytime it looked strange. (was using svt40)
Thank you for the information, I'll see if I can tweak the values to avoid this.
The updated version still has reflections on some weapons but with the fixed lighting calculation they hopefully shouldn't be an issue. If they still bother you, you can get rid of them by uncommenting the SSR_MIN_DEPTH line in ssr_settings.h, thou that will also disable the effect on any other surface too close to the camera.
THANK YOU! this version is much faster!
translate.google.com
in my playthrough i noticed a lot of ssr on the right side of my weapon on the ground, i tried to uncomment in the ssr_settings.h but didn't worked
here's the issue:
I.imgur.com
I.imgur.com
as you can see, on the right side of the weapon there's a lot of gloss/reflection on the grass/ground
You mean.. on the left side of the weapon..? Right?
nope, on the right side of the weapon you can see tons of reflection on the ground (the second image is more noticeable), it's caused by the headlight that somehow think that the ground is near the weapon (i think) so creates a lot of reflection even on the grass
it's still tolerable anyway
Oh okay, I see! Thanks for clarification, yes you're right!
Thank you for the report, I'll see what I can do about it.
I'm getting this error after doing the "Clear Shader Cache" in the launch menu.
combine_1.ps(7,10): error X1507: failed to open source file: 'ssr.h'
I'm using Enhanced Shaders PBR along with your mod/patch.
Edit: My bad lol, accidentally installed just the patch and not both files. It's good now.
Is there any possibility to add SSR on the water surfaces?
I've seen some screenshots with SSR enabled on water but couldn't find any mod/guide to add this effect.
Great mod btw!
Yes currently the water surfaces for some reason don't have gloss on them and thus don't trigger the reflections, it's on the list of things to try adding.
Thanks for the water SSR update, It looks great!
Will it work with dx11?
I guess you didn't read the description? Yes, it probably won't work without DX11 (DX10 maybe, haven't tested and even then probably not too performantly).
good job
it works man thx. Sorry about that earlier maybe i havn´t understand. Is there reflections like in demosfen planned for the future? That would be great!!!
Apology accepted. As for the demosfen reflections, I haven't played it so based on the images and the description if you mean the "puddles after rain" then yes and no.
I do have plans to try make the water appear to form puddles on flat horizontal surfaces and crevices _during the rain_ but I have doubts on how feasible it'll be without engine modifications.
If I get that working then I might also be able to make the reflections stick around after the rain with some shader_param scripting.
If it requires engine modifications then that's a rabbit hole I don't want to climb down at least just yet.