Overhauls shaders for a more modern and customizable appearance without the need for ReShade. DX10+
This mod overhauls the lighting and post processing effects of the X-Ray engine for greater visual quality and easier customization. It implements modern graphics techniques and improves the overall handing of light and color within the engine.
It is separated into 2 parts, both of which can be installed individually however they must be installed in the numbered order to prevent conflicts.
Gamma correct lighting with PBR style specular and various fixes for more modern visuals. This also fixes problems within the shaders, enabling translucent lighting effects on foliage and improvements to tonemapping and bloom blending.
The specular roughness is customizable using the settings in pbr_settings.h
A non-PBR version is available if you do not like how the PBR specular looks. This features all of the gamma correction and fixes however it uses the original diffuse and specular effects to retain the original look of the game.
NOTE: There are currently problems with the DX9 version, DX11 is recommended.




Customizable color grading based on the ACES standard, controllable with both in-engine console commands and simple shader modifications.
Use r__color_grading to color grade your image as shown in these examples:

Adds new effects and allows color grading to be controlled using the shader_param_ console commands. This gives you complete control over the color grading.
The new effects are contrast control and a channel mixer, these allow for more interesting color modifications.
For compatibility with Beef's Shader Based NVGs there is also a simple version included. This does not feature the channel mixer as those shader_param settings are used for his nightvision effects
The controls work as RGB + Offset, with the first 3 values controlling the red, green and blue channels and the 4th adding to the whole.
These are the default values of each command and the setting that it controls:
NOTE: Saturation is done after power and before contrast.
There are config files included that can be loaded using the cfg_load console command as shown:
cfg_load grading_default
There are multiple preset config files for different styles.
NOTE: The vibrant and filmic presets are not included with the simple version as they use the channel mixer.
I recommend that you find a preset that you enjoy, copy it and tweak it to your taste, either in game or with a text editor (you can reload your config to see any changes made after saving)
The screenshots below use Corrected Cubemaps and the weather from Aggressor Reshade with these settings:
r2_sun_lumscale 3.0
r2_sun_lumscale_hemi 1.0
r2_sun_lumscale_amb 0.5
r2_tonemap_middlegray is often tweaked for each shot.







Cubemaps filtered for improved specular reflections and ambient lighting. This is compatible with both the PBR and non-PBR versions of Enhanced Shaders.
Anomaly's default cubemaps often do not match the color of the sky, this patch fixes this problem as well as providing higher quality reflections for PBR.
This might change the brightness of ambient lighting in some cases.
NOTE: This is will not work as intended with the default shaders.
Mod Organiser 2 is highly recommended to prevent problems with uninstalling this addon
NOTE: r2_gloss_min MUST be used to control the specular to prevent inconsistent specular highlights (r2_gloss_factor is affected light brightness).
NOTE: You may need to adjust your r2_sun_lumscale_ settings after installing this mod. The gamma correction causes lighting to blend differently and will cause the colors of the lighting to change.
pbr_settings.h contains settings for tweaking the PBR specular and diffuse.
#define USE_BURLEY_DIFFUSE
enables/disables Disney's Burley diffuse, enabled by default. Enabling this creates a more realistic appearance on rough surfaces.
#define USE_GGX_SPECULAR
enables/disables GGX specular, disabled by default. Enabling this will allow lights to use the prettier but more expensive GGX specular seen in most modern engines. This might make specular too prominent.
The settings below are used convert the glossmap and material ID into PBR specular and roughness values.
r2_gloss_min is used to tweak to the result in engine.
#define ALBEDO_BOOST 0.50
Controls the boost in brightness for the diffuse texture. This helps balance out the brightness of PBR specular.
#define ALBEDO_AMOUNT 1.00
Controls the brightness of the diffuse texture.
#define ROUGHNESS_LOW 0.5
Controls the lowest value of the roughness. Decreasing this will make highlights shinier.
#define ROUGHNESS_HIGH 1.0
Controls the highest value of the roughness. Decreasing this will make everything shinier.
#define ROUGHNESS_POW 1.0
Controls the power curve of the glossmap. Decreasing this will make make the highlights stronger more pronounced.
#define SPECULAR_BASE 0.04
Controls the zero incidence specular value. Increasing this will boost the overall specular.
#define SPECULAR_RANGE 1.0
Controls the amount of influence of the glossmap and material ID on specular. Increasing this will make highlights from the glossmap more pronounced.
#define SPECULAR_POW 1.0
Controls the power curve of the specular. Increasing this will make the specular more contrasted.
#define METAL_BOOST 0.25
Controls the boost in glossiness that metal will receive.
#define METALNESS_THRESHOLD 0.125
Controls the minimum amount of gloss needed for metal.
#define METALNESS_SOFTNESS 0.125
Controls the smoothness of the transition between non-metal and metal.
NOTE: In PBR 'specular' refers to the amount of reflection while facing a surface directly.
ACES_settings.h contains the variables for used color grading, by default they are set up to use the in-engine variables, however they can be set manually for greater control.
In log space colors can behave strangely, here's how the controls generally affect the color grading:
If you do not like the how color grading behaves in log space you can disable it to grade in linear, which most users will probably be more familiar with (it will behave the same as Lift Gamma Gain in ReShade).
ACES_LMT.h contains additional color effects that can be used together, by default a contrast reduction is enabled to match the original look of the game.
There are multiple #define directives used to control various features:
#define USE_ACES in ACES.h
enables/disables ACES, enabled by default. If disabled color grading will be done without any wide gamut color transforms. Disable this for performance.
#define USE_LOG_GRADING in ACES_settings.h
enables/disables ACEScc log space for color grading, enabled by default. If disabled color grading will be done in linear space.
Change log
1.10 - Metal improvements with Mipfog and Fixed Bloom
Improved tree and grass normals
DX9 support removed
Fixed Bloom addon added
Improved bloom blending
Improved metal specular
Improved roughness and specular calculations
Improved gamma correction
Shiny terrain fixed
Added ALBEDO_BOOST to brighten dark textures while retaining color
Added METAL_BOOST to increase the glossiness of metal mat_IDs
Added Disney/Burley diffuse BRDF as default
BLOPS 2 ambient BRDF used for non-GGX PBR
Cubemap mipmap blend fixed
Mip fog added
Sun fog added
Height fog added
Reoriented normal map blending added to improve detail mapping
ACES Blue-Fix LMT applied by default
Fresnel for non-pbr improved
1.09 - Detector Fix and Crash fix
Alpha channel of accum buffer now works as self illumination, fixing all artefact detectors
Missing files added
Simple shader_param control option added to prevent conflicts with Beef's Shader Based NVG
1.08 - Foliage fix and new color grading effects
Foliage SSS fixed
Grass material ID set to the foliage ID
Grass specular improved
Grass normals changed
Default pbr_settings values changed for greater reflectivity
Color grading moved to ACES_Color_Grading.h and treated as a LMT
Added contrast and channel mixer to shader_param controls
LMTs supported even with ACES disabled
LMT setup and usage changed
shader_param behaviour changed to RGB + Offset for easier adjustments
shader_param controls extended with new effects
New color grading preset cfg files to demonstrate color mixer and contrast effects
Old color grading presets adjusted for less extreme tinting
Updated ACES RRT with glow module and red modifier
Fixed the brightness of corrected cubemaps in shader (no longer need lumscale adjustment to match the original brightness)
Strict gamma correction option for sky blending removed, it caused problems with ambient lighting
USE_ACES_COLORSPACE removed since USE_ACES will serve the same purpose now
1.07 - Detector self illum fix
Artefact detector self illumination fixed
pbr_settings.h added for controllable specular
PBR cubemaps added for more accurate lighting
Fixed ambient cubemap projection
mirrored power added to tint negative ACEScc log values
Added example shader_param cfg files
1.06 - Now without PBR!
Non PBR version of Enhanced Shaders added
ACEScc black level fixed
Renamed Gamma to Power
Saturation changed to the official equation
shader_param_ support added
1.05 - Dark interiors and gamma correction fixed
1.04 - Exoskeleton fix 2
1.03 - Exoskeleton fix
1.02 - Gamma and Detector fix
Fixed Detector white screen
sRGB improved and optimized
Option for gamma correct sky blending added
1.01 - DX9 fix
1.0 - Release
Hello! thx for the mod. I have one problem. Its too dark indoors...how can i control it?
I think it because i'm installed Michiko's weather revamp 2.0
And second question, how can i control saturation and contrast skies? Previosly i've game with skybloom fix.
This mod fixes the skies too, you can overwrite skybloom fix.
PBR Implementation? This is so damn sexy.
Does the shader use normal information to generate the specular/roughness values?
No it just maps the gloss map to roughness and uses the gloss map and material index to calculate the fresnel
Smort!
I've also got the problem where blacks look really badly crushed and gamma seems really off. I'm glad to hear it's a bug being fixed cos when I saw the mod, it was like wow, then tried it and was quite disappointed. Seeing the screen shots up top look completely different to my game.
EDIT:after the last update, its fixed any issue I had, looks spectacular now. Image looks a lot clearer and coherent, thanks!
Anomaly without this mod Fastpic.ru
Anomaly with this mod
Fastpic.ru
Anomaly with this mod + Michiko's Weather Revamp 2.0
Fastpic.ru
So hard deep black. May i can fix this?
just change amb settings
Hey, noticed some weird lighting behavior around campfires. Seems to be caused by this mod but not 100% sure it's the culprit lol heres a vid https //youtu.be/9jKXkJVYpT4
So I have an absolutely bizarre crash. When having a gun equipped and putting on a Nosorog, the game crashes. I've started a new game with ONLY this mod on and it still happens; it doesn't happen when the game is unmodded or with only my usual mods. The log doesn't give a useful error message:
stack trace:
[error][ 258] : The wait operation timed out.
at address 0x0000000140838287
Not a huge deal as I consider Nosorogs way too OP to use anyway, but thought I'd mention it.
Edit: It's all exoskeletons. Exosuits and below work fine with a gun.
Getting the same error here. Hard crash with the same last chunk of the log.
Except this is when activating a Bear Detector. For the record, the same crash does NOT happen with the Echo detector. I don't currently have the higher grade Veles or Svarog to test with.
Great mod. Rare to see changes/fixes on a technical level. Thank you.
Crashes when using Bear Detector
Affects other commonly used mod, "food-drug-and-drinks-animations-for-anomaly", mentioning in case people wonder what the cause is.
Burning cigarette item's shader for making the tip "burn" red becomes unshaded/white.
Will probably be fixed by them soon to work with this mod.
Hello there!
Unfortunatly my game is crashing after level loaded, as soon as I "press any key" the game crashes to desktop.
Here's the error:
FATAL ERROR
[error]Expression : file
[error]Function : CResourceManager::_CreatePS
[error]File : ..\xrRender\ResourceManager_Resources.cpp
[error]Line : 258
[error]Description : d:/anomaly-1.5.1.2\gamedata\shaders\r2\accum_emissivel_detector_fix.ps
Looking foward to a fix so I can try the shaders myself!
I've uploaded the fix
what do I tweak so that I don't get interiors that are too dark? I'm using michiko's weather 3.0 and I am trying to make it work out somehow
The newest update with the black level fix installed should improve this problem, however as far as I can tell that's simply how gamma correction causes the ambient lighting to blend together. I can't find anything in hmodel.h that would cause it to be so dark.
Try tweaking your r2_tonemap_lowlum setting, I usually keep it at 0.1
[edit] It was a bug with the gamma correction. It's fixed now
I tried doing that, it looks fine aside from lights from the light sources inside the 100 rads bar for example, they seem to be a bit brighter than I'd like.
It looks good overall though.
THIS
fixed most contrast related issues i have seen so far. For example in Garbage/Train Depot, you are inside but can see the outer world. The picture was either too dark or oversaturated, depending on settings i've tried.
You may update your docs with this ?
by how much did you raise/lower the value in line 6?
sry i've deleted my post because the author have posted a better solution. but it was 'float C
EDIT:
this stupid editor does not allow me to write
_float_Contrast_=_0_._5_;_
remove the underlines and you will get it :))))
thanks.
Will it be possible to make it compatible with DX8 also? Would really love to try it.
Any chance you could make compability patch for BEEF'S SHADER BASED NVGS V0.9?
Has this been updated recently?
It just released...
I'm updating it frequently at the moment to fix any major bugs.
This looks great, but the Svarog detector still will not self-illuminate :(
Detectors should be illuminated again now
Thanks for all your work! It looks fantastic, and the presets are great for showing you how the numbers translate to effects. It'll be interesting to find a balance that looks rich while leaving nightvison useful.
One small thing, and it may not be this mod -- the anomaly spots on the Svarog seem to be sky-illuminated. Like, the screen itself remains lit, and gets a little brighter depending on how much light is on it. The anomaly spots are only really visible when looking straight down -- with max sunlight possible -- and fade to 50% when the detector is at a normal angle, then disappear if you look at the sky. Could that be model_selflight_det2? That's the only shader I have that isn't from this mod; it's from feelfried's animations, and i thought it was for the cigarette's cherry. Cheers.
Have you ever figured it out? Having the same problem.
ya, it turned out not to be this mod, it was feel_fried's animations, which was updated & fixed some months back. what other mods are you running?
Huh, I'm using them as well, the latest version. Along with other 65 addons, but the only other graphical one is skyboxes redux, which doesn't seem to mention this problem on its page. Well thanks anyway, I'll keep looking.
This addon seems to be very bugged for me, my game looks like this with it enabled: Imgur.com
This is with only the color grading part installed: Imgur.com
Just for reference, this is how it looks by default: Imgur.com
And this is with both parts enabled and the black level fix: Imgur.com
Also, the command r_color_grading doesn't exist for me when I try to type it in the console. These issues are fixed when I don't install the color grading part of your addon.
And how are we supposed to preserve the glossiness of weapons and other textures? Setting r2_gloss_factor to your recommended value reduces the excessively bright ground textures but the gloss is gone. r2_gloss_min does almost nothing at it's max value, even. Maybe I'm just not understanding something here, haha.
The command is r__color_grading with 2 underscores after r. That should fix it.
You're right, that fixed it, thanks. So the nice gloss on weapons being gone is the only issue now.
I seem to have the opposite issue with blacks... The shadows etc look more grey to me.
Could it be because I enabled GGX Specular?
Disable the log color grading, currently it washes out the blacks
[edit] washed out blacks from log grading should be fixed now, however PBR does tend to make the game look more washed out since none of stalker's assets were designed for PBR
This comment is currently awaiting admin approval, join now to view.
This comment is currently awaiting admin approval, join now to view.
Wow this mod is incredible, i have never seen lighting like this in a stalker mod. Thank you for the work!
I.imgur.com
I.imgur.com
I love cold color
Every update makes things better and better, but one thing I keep noticing is that grass/foliage seems to turn white and lose its detail at certain angles when in direct light. I think it might be an issue with the SSS or something.
Screenshots:
Imgur.com
The top picture is looking into the sun direction while the bottom is looking the opposite. The top should be using SSS because the sun is bleeding through the other side of the foliage but it seems to have greater specularity then the side of the foliage reflecting the light and all the detail is washed out. I noticed the color seems to change with the color of the light shining through it as well.
Foliage has quite a few problems at the moment, especially on dx9. Once I fix the white trees bug I'll decrease the specular on foliage
Thanks for the response, unfortunately I had to disable the mod due to a consistent crash. When traveling from Great Swamp to Agro I got this crash.
Dump Summary
Process Name: AnomalyDX11AVX.exe : C:\Users\"USERNAME"\Documents\Stalker Anomaly\bin\AnomalyDX11AVX.exe
Process Architecture: x64
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Not Present
After trying to restart the game I got a shader compilation error and the log stated that there was an undeclared identifier for SRGBToLinear in lmodel.h(13, 18).
Might be my pc or something because its been kinda weird lately but uninstalling the mod allowed me to play again.
Try reinstalling the mod, SRGBToLinear being unidentified implies that something is overwriting common_functions.h which loads srgb.h for the gamma correction code
everything is blacked out.
Follow the set up in the description, remember that r__color_grading has 2 underscores
hey i've followed everything in the description and everything is still gray, do you still have that black level fix? cause i can't find it in the files anymore
nevermind, i guess i didn't notice the shader_param controls section and just installed it without touching anything
I rarely comment, but this time I just couldn't pass it through without keeping my mouth shut. Gotta say it's a really amazing addon. Your shader rework allows for naturalistic lighting, that defeats all the ingame options, I no longer have to manipulate lumscales and other options If i don't want to be completely blind in certain lighting predicaments. Amazing addon mate, thank you for your work.