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
This comment is currently awaiting admin approval, join now to view.
Hey, for some reason, using the Param Controls optional files gives me a "failed to compile shaders" error on startup every time without fail. I cleared shader cache and everything.
EDIT: It turned out to be that I was trying to load the full version of the Param Controls which this mod explicitly states doesn't work with Beef's Shader Based NVGs (Which I have running - I wasn't reading the description). Switching to simple Param Controls for compatibility with the NVGs mod worked fine.
same but the crash where shaders failed happens after i clear shader cache
You may have found inadvertently what makes BaS and ES incompatible. I've reinstalled the mod without the optional parameter controls and the issue everyone had with lasers and shader compilation errors stopped happening for me for some reason.
You should make the shader controls usable in MCM
Idk what I'm doing wrong, but this seems to have literally no effect on how my game looks. You're just supposed to copy to the anomaly directory and overwrite gamedata folder from 01 Enhanced Shaders first, then 02 Enhanced Color Grading, and then the optional folders right?
I Have the same situation;) You must only one: in game push "`" and paste this: cfg_load grading_default next try this: cfg_load grading_vanilla for example, are there differences in your graph ;) "grading_examples" you should have in appdata.
This comment is currently awaiting admin approval, join now to view.
You have to do the setup every single time to close and relaunch the game?
am i doing something wrong? i followed the install instructions to the letter and i dont see any difference? Does something change that is barely noticeable?
is the creator of the mod alive? he hasnt replied in months
Entered everything needed in the console and got everything so dark, even with nvg on. What i did wrong?
Imgur.com
I would like to know why aswell, having the same problem
This comment is currently awaiting admin approval, join now to view.
What are the textures in the first picture?
How do I set this mod so that when it rains, the textures get wet, and when it doesn't rain, there's no glow on the ground? I have vanilla textures.
Hi, when i clean the shader cahe manually or launcher this give me that error& the game don“t open,
i made a clean installation.
how i can fix this?
! c:/program files (x86)/s.t.a.l.k.e.r. anomaly v1.5.1.2\appdata\shaders_cache\r4\combine_1_msaa_0.ps\1536111100110000001000100000110231113010121000
! error: common_functions.h(29,6): warning X3205: conversion from larger type to smaller, possible loss of data
common_functions.h(77,2): warning X3206: implicit truncation of vector type
common_functions.h(82,49): warning X3206: implicit truncation of vector type
common_functions.h(114,2): warning X3206: implicit truncation of vector type
gbuffer_stage.h(123,24): warning X3206: 'Load': implicit truncation of vector type
gbuffer_stage.h(124,23): warning X3206: 'Load': implicit truncation of vector type
night_vision.h(323,37): warning X3206: 'Load': implicit truncation of vector type
night_vision.h(342,30): warning X3206: 'Load': implicit truncation of vector type
pbr_brdf.h(153,15): warning X3206: implicit truncation of vector type
pbr_brdf.h(154,15): warning X3206: implicit truncation of vector type
pbr_brdf.h(155,15): warning X3206: implicit truncation of vector type
pbr_brdf.h(163,9): warning X3206: implicit truncation of vector type
hmodel.h(29,14): warning X3206: 'mul': implicit truncation of vector type
hmodel.h(34,17): warning X3206: 'mul': implicit truncation of vector type
ssao.ps(126,9): warning X3206: implicit truncation of vector type
ssao.ps(151,22): warning X3206: 'gbuffer_load_data_offset': implicit truncation of vector type
ssdo.ps(88,34): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(116,22): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(117,22): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(118,22): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(119,22): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(132,44): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(133,44): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(134,44): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(135,44): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(174,44): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(188,25): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(190,25): warning X3206: 'Load': implicit truncation of vector type
ssao_hdao.ps(288,2): warning X3206: implicit truncation of vector type
combine_1.ps(67,21): warning X3206: 'gbuffer_load_data': implicit truncation of vector type [2]
combine_1.ps(76,47): warning X3206: implicit truncation of vector type
combine_1.ps(76,29): warning X3206: 'Load': implicit truncation of vector type
combine_1.ps(93,7): warning X3206: implicit truncation of vector type
combine_1.ps(103,9): warning X3206: 'calc_hdao': implicit truncation of vector type [3]
combine_1.ps(142,34): warning X3206: 'lerp': implicit truncation of vector type
combine_1.ps(149,7): error X3004: undeclared identifier 'shader_param_8'
So, essentially, I've found an alternative fix for the BaS (or B&S) laser shader problem. Instead of disabling the laser file (by deleting it or adding ".old" at the end of it), you can simply decide to not install the Enhanced color grading file of the Enhanced shaders mod. That allows you to use both mods and BaS' laser weapons.
From what I could gather (I'm no expert in coding AT ALL so I might be wrong) the problem lies with the ACES system used for colorgrading. Enhanced Shaders seems conflict with a single BaS file: img_corrections.h. In that file of the ES mod, it is written at the very top "DISABLED FOR ACES". This means, I believe, that the colorgrading element of the mod deactivates the reference to img_corrections.h to use the multiple ACES files instead for image correction. Since img_corrections.h is disabled, BaS cannot find the needed file to make its lasers work because it is disabled and the ACES file are not coded in a way to allow the laser to function because it seems to work on a completely different framework and method.
To fix it, someone would need to make a patch for ES and BaS that somehow replaces the ACES files with ones that can do the same end result the img_corrections.h file was doing. It's here that my knowledge ends, because I have no idea how to do it or if it is even feasible.
I hope this helps. Don't forget to clear your cache before doing it. That's how I made it work, but I'm unsure if it changes anything.
The issue has nothing to do with shaders. There's a script zzz_bas_laser_control that literally types in the console shader_param_5 0,0,0,0 and removes the red from the viewport. Find the line
exec_console_cmd(string.format("shader_param_5 %s, 0, 0, 0", arg))
and change it to
exec_console_cmd(string.format("shader_param_5 1, 0, 0, 0", arg))
You should also open the laserbeam.ps shader, delete everything that's written in there and paste this.
#include "common.h"
struct v2p
{
float2 tc0: TEXCOORD0; // base
// float2 tc1: TEXCOORD1; // lmap
float3 c0: COLOR0; // sun
};
//////////////////////////////////////////////////////////////////////////////////////////
// Pixel
float4 main( v2p I ) : SV_Target
{
// float4 t_base = tex2D (s_base,I.tc0);
float4 t_base = s_base.Sample( smp_base, I.tc0 );
float3 light = I.c0;
float3 final = light*t_base*2;
// out
return float4 (final.r,final.g,final.b,t_base.a);
}
it's an alternative old shader that doesn't address shader_param_5. Or you can just delete shaderbeam.ps, but there will be no lasers.
Clearly, you probably know a lot more than me on that subject. If it does work I'll edit my comment to point to your solution instead. Thank you!
By laserbeam.ps, do you mean models_laserbeam.ps? If so, there seems to be 3 of them in different folders: r1, r2, r3. Should I change all of them?
I tried changing all of them and only the r3 one with the changes you suggested in the script file. It sadly did not work. The current install seems unable to create the models_laserbeam.ps folder in the cache section and the log returns me this:
! d:/games/stalker - anomaly\appdata\shaders_cache\r4\models_laserbeam.ps\15361111001100000000000100001102110100101000000
! error: common_functions.h(29,6): warning X3205: conversion from larger type to smaller, possible loss of data
common_functions.h(66,2): warning X3206: implicit truncation of vector type
common_functions.h(71,49): warning X3206: implicit truncation of vector type
common_functions.h(103,2): warning X3206: implicit truncation of vector type
(18,21): warning X3206: implicit truncation of vector type
(22,1): error X3000: syntax error: unexpected end of file
Edit: The error pops up even with only BaS in my load order. So it's something about the shader fix you gave me that doesn't work.
Edit 2: I've found the culprit: it's the optional parameter control files from ES shaders that somehow causes the bug. Someone else commented that it caused issues for them and I just assumed that it might be because they had BaS installed. So I tried reinstalling it without that component and everything was fine. I think it's because the base ACES.H file doesn't use the shader_param_5 to control the color mixing, which means BaS can use it without conflict. So you give up the custom color mixing for BaS lasers.
You don't even have to give up the custom color grading part. The fix suggested by jdud works just fine.
I edited scripts/zzz_bas_laser_control.script and shaders/r3/models_laserbeam.ps as described in the comment and the crash is gone. Still haven't seen a BaS laser pointer though so not sure how it's going to look with the edited shader.
This fixes it. Thank you so much!!!
Mod author should add this fix in.
This comment is currently awaiting admin approval, join now to view.
Will this work properly with Skies Redux? The sky textures are not that great, but some files are the same.
Moddb.com
Can i ask why do i have a black screen with flashing white? I don't understand these things so where did i **** up? Can anyone help me pls?
I had the same issue. Use the console and type: cfg_load grading_default (no quote marks)
Thank you! I have been trying to fix this issue for litterally 3 hours now lmao and this fixed it immediately!
Idk why, but it didn't help in my case. I even restarted the game with and without clearing cache.
with this mod on the volumetric sunshafts have a blue tint when its dark. Is there a way to change the settings of the ACES files to fix this?
same problem here - really gets in the way quite a bit with some redesigned weathers at night
change sunshafts to screenspace only and it'll be fixed - the issue is with volumetric.
Hello, when i write r__color_grading and i put the numbers nothing happen, i tried using it with shader param , but nothing too, you know why this is happening?
if the author ever returns to update this - the PBR would be amazing if it's distance could be limited so that it only affects weapons or immediate vicinity around actor. As it stands, it causes unbearably ugly and unrealistic distant lighting on terrain in line with the sun in high-brightness scenarios like during clear weather.
thats the issue with textures, not shading model itself. time for pbr retexture pack for anomaly
Consider the project green-lit ;) Perhaps next version of GTR?
As a side note, a massive thank you for creating the corner shadow fix present with Joe's Majestic weather. May be a good idea to publish as a freestanding addon.
it's a single line of code though, i dont see a reason to post it on moddb.
maybe with some shaderpack, or pack of other fixes. idk
This comment is currently awaiting admin approval, join now to view.
This comment is currently awaiting admin approval, join now to view.
dont know if this has to do with this mod but around 8am in the game there is sunlight bleeding through the terrain. Is that normal?
normal xray behaviour, not ES fault.
Will you make an update for 1.5.2?
This comment is currently awaiting admin approval, join now to view.
im using mod organizer and install all correctly and when i start the game everything is black? can someone help me
Update: I know that i have to do the cfg_load but when i start again all the shadows its too much darker
Try installing shader_param from ES zipped file, try cfg_load grading_vanilla, should not be that dark anymore.
For everyone with the white grass and trees bug, I managed to fix it by using Grok's Optimized graphics patcher (link: Moddb.com) and following the instructions exactly as written on the page I linked. It also fixed the noisy pixels bug associated with the Glossy SSR addon. I'm not using any other shaders or texture addons.
I play with default r__color_grading settings 0.5, 0.5, 0.5
r2_gloss_factor 0.001
r2_gloss_min 0.5 but when I look at the sun it's like it's not even the outline of the sun is not visible... what setting (command) can fix this?
Some how this is the first shader addon that i have installed that improved the games performance. I'm not sure what about it is making it this much smoother but I have not had a dropped frame in hours. Its crazy. Thank you.
Hello I really love the addon but the night time it's kinda weird any way to fix this? Cdn.discordapp.com