Overhauls Anomaly's shaders for a more modern and customizable appearance without the need for ReShade. DX9+
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.
Features:
- Gamma correct lighting
- PBR-ish specular
- ACES tonemapping and color space
- Log space color grading with ASC CDL (SOP-S) based controls
- Simple customization and expansion
- General fixes to prevent clipping and other visual flaws
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.
Part 1 - Enhanced Shaders
Gamma correct lighting with PBR style specular and various shader fixes for a more 'correct' and modern look.
There is a non-PBR version if you do not like how PBR affects the look of the game.
NOTE: There are currently a lot of bugs with the DX9 version, DX11 is recommended.
![Enhanced Shaders before & after Gamma correct lighting and PBR specular]()
Part 2 - Enhanced Color Grading
ACES based color grading that is controllable with both in-engine console commands and simple shader modifications.
![4 examples of color grading using console commands color grading]()
Patches
shader_param controls - Allows color grading to be controlled using the shader_param_ console commands. This gives you complete control over the color grading.
These are the default values of each command and which setting it controls:
-
- shader_param_1 1,1,1,1 - Slope
- shader_param_2 0,0,0,1 - Offset
- shader_param_3 1,1,1,1 - Power
![examples of color grading using shader_param controls color grading example]()
Installation
- Put the gamedata folder from each part into your Anomaly directory, overwrite all when prompted
- Delete the shader cache using the launcher or delete the appdata/shaders_cache folder manually
Setup
- Use these console commands to set everything to the intended default:
- r__color_grading 0.5, 0.5, 0.5
- r2_gloss_factor 0.001
- r2_gloss_min 0.5
- Use r2_gloss_min to control the glossiness/roughness of the PBR specular
- Use the r2_tonemap_ console commands to set your camera exposure
- Use the Basic Light Settings and r__color_grading and to color grade your image
- Tweak to your taste
NOTE: r2_gloss_min MUST be used to control the specular to prevent inconsistent specular highlights (r2_gloss_factor is affected light color).
NOTE: You may need to adjust your r2_sun_lumscale_ settings after installing this mod. The gamma correction causes ambient lighting to blend differently, and the ACES tonemapper has a noticeable 'toe' that darkens the shadows. As far as I can tell this is not a bug.
Customization
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 affect the color grading:
- Slope - Tints the light tones
- Offset - Tints the whole image
- Power - Tints the dark tones
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 a list of files that can be used to add additional color effects, by default a contrast reduction is enabled to match the original look of Anomaly. Uncomment the #include lines to enable them.
There are multiple #define directives used to control various features:
#define USE_PBR in pbr_brdf.h
enables/disables PBR specular using the gloss map, enabled by default. If disabled the specular will mimic the original behavior using the material index as roughness
#define USE_GGX_SPECULAR in pbr_brdf.h
enables/disables GGX specular, disabled by default for performance
#define USE_ACES in ACES_settings.h
enables/disables ACES, enabled by default. If disabled color grading with still work however LMTs will not be available
#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
#define USE_ACES_COLORSPACE in ACES.h
enables/disables ACES color space transformations, enabled by default. Disable this if you are having performance problems
Change log
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 Screens
sRGB improved and optimized
Option for gamma correct sky blending added
1.01 - DX9 fix
1.0 - Release
This is awesome work, and congrats KennShade on getting this released!
It's really awesome and adds a lot of depth, and definitely better than what I was able to achieve with ReShade.
As a sidenote: You can't use Beef's NVGs when you're using this - I'll drop a patch on my end for it
Excuse me for being a pratt,
Any timeframe for the nvg patch? Enjoying this a lot so far btw, sometimes the lighting is jaw dropping in red forest, especially with Absolute Nature Tan Omega
The patch is out just not on ModDB, here you go.
Cdn.discordapp.com
By the way, the shaders part of the patch says to install after you install the enhanced shaders. Instead you need to install the patch AFTER both enhanced shaders and enhanced colour grading.
r__color_grading controls the colors as shown in the pictures? can you give the values of those colors in your pictures? or how i change the color? thanks for the mod.
r__color_grading uses 3 numbers separated by commas, they're RGB values that control the color. You can separate them with spaces to make them easier to read.
For example:
r__color_grading 0.475, 0.485, 0.55
This would make the image more blue/teal by darkening the red and green and brightening the blue.
Maybe you could write some examples of the values used in the pictures or something if you want in some readme or something, so people can try different colors already fine tuned.
Thanks for the mod again just a suggestion.
I believe this is causing a problem with anomaly detectors - not sure about others, but the Svarog screen is white with this enabled.
I've had a similar problem with the geiger counter, I'll look into it
Same for veles detector, if we get a workaround IMHO it's best kind of reshade-like effects, since it won't eat any fps.
Can confirm white screen with svarog detector I.imgur.com
well... srry for autism... models_lfo_light_dot_weapons.s works fine with your shader, so if somebody wanna quick autisitc fix - copy that shader to shaders/r3 and rename it to models_selflightl.s xD that will "fix" detectors xD
the game crashes at startup in dx9, "shader compilation failed", i checked delete shader cache in launcher.
Can you copy and paste the end of your log file? It'll show me what caused it
compiling shader ogse_sunshafts_mask
! j:/juegos/anomaly-1.5.1.2\appdata\shaders_cache\r2\ogse_sunshafts_mask.ps\153611110011010000000100000110101013
! error: ACES_settings.h(21,8): warning X3206: implicit truncation of vector type
common_functions.h(29,6): warning X3205: conversion from larger type to smaller, possible loss of data
common_functions.h(54,8): error X3003: redefinition of 'unpack_tc_base'
I've found them problem, I was using the same common_functions.h for r2 and r3. The fix will be uploaded shortly
Does this only work on dx9 ?
It works on dx9 and higher. There is no dx8 support
Thanks
Wow this is great to see, I along with probably many others have been wanting this kind of customisation for a while!
Would this ever be able to be controlled with the new mod configuration menu rather than console commands one day? That'd be a game changer right there
Can you recommend good r__color_grading? Im bad at these stuff
r__color_grading 0.48, 0.485, 0.49 is the setting that I use unless I'm taking screenshots. It tints everything very slightly blue to make the tone of the image 'colder' without being overblown.
I also uncomment the LMT_Technicolor in ACES_LMT.h since I prefer the way it boosts color compared to the regular saturation control
Look for color palettes in movies that you like and play with the settings to try and match them.
Ah I see thank you so much!
sorry for the stupid question, but besides color grading, what else can be adjusted on the game console?
The 'Basic Light Settings" in the options all still work, brightness and saturation are now part of the color grading so that they work in HDR, however the gamma is left as it originally was for people who rely on it. Other than that it's just c__color_grading unless you edit ACES_settings.h
just started it up and audibly said "oh wow" lol looks amazing however am encountering a little hiccup.... its turned some of the foliage around freedom's base white? seems the sky has turned white as well lol or not sure if thats just how cloudy looks now. am on dx9 enhanced. heres some ss
edit: checked out some other maps and it seems to be all the foliage, most trees and bushes are "white" like in the screenshots. any tips? also any tips to remove this for the time being? wasnt sure if i just need to remove the shaders folder or what lol thanks friend
https //imgur.com/a/wsKnSZO
edit 2: Hey! If anyone is experiencing similar, using this mod "ABSOLUTE NATURE TAN OMEGA (FIXED 1.5.1)" actually fixed it for me! The detector is still white, but all foliage seems to be looking great :)
Here's some more ss https //imgur.com/a/piDbaO5
I think it's the same issue as with the detectors/geiger counter.
Really like what this is trying to do but I would wait on a fix first.
Maybe the description should have a before after of the gamma correct lighting? Whenever I install anomaly I always turn gamma down to .7 and color saturation up to 1.3 and the game ends up looking a lot more natural.
Does anyone else have difficulties playing during the night, and even during the day? I feel as if a large amount of the time, it is too dark for me to be able to see much of anything at all.
First put in the console commands he listed in the desc in order to correct the color grading. The game was a bit to dark for me even then so I upped the gamma up to about 1.2 and that seemed to improve things.
Try boosting your r2_sun_lumscale_hemi setting, I usually have it at 1.4, or change the r2_tonemap_ settings to boost the exposure.
If the problem is that the darkest parts of the image look washed out, try disabling the log color grading, there's a problem with the log transform that messes with the black level just slightly
Hey
I only have part 1 installed, can you tell me if I can tweak contrast somehow? I love deep contrasts and I love that it does not affect the UI, but it is a little bit too strong for my taste.
Cheers
Part 1 shouldn't change the contrast at all, however there is a problem with the gamma correction in the ambient lighting that I'm working on fixing
That might actually be it, because everything that is not exposed directly by a light source seems to lack gamma. Unless that is a whole different issue :D
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?
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.
This comment is currently awaiting admin approval, join now to view.
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 ?