The stand-alone mod S.T.A.L.K.E.R. Anomaly aims to be the most stable and customizable experience for fans of the S.T.A.L.K.E.R. games. It's powered by the Monolith 64-bit engine, a custom fork of the X-Ray engine.

Description

Night vision shader for anomaly re-imagined. Now features MCM settings to adjust NVGs to your taste, a totally rewritten rendering pipeline, and a bunch more.

Preview
Beef's Shader Based NVGs v1.1.1
Post comment Comments  (50 - 100 of 304)
Valley_of_Snow
Valley_of_Snow - - 39 comments

Not a bug regarding beef's mod, but if you use a retexture for gunsight reticles, you run the risk of having bloom become overwhelming to the point you may not be able to use the optic at all during NVG use.

I am using bert's Moddb.com for reference, and the Kobra sight retexture is unusable on anything below a threshold for washout setting of 0.9. Again, not an issue with this mod and removal of the offending sight texture will fix the issue, but it's something to keep in mind perhaps. Everything else seems to be working as intended on the v1.0.1 release of Beefs NVG's for 1.5.1.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

In chasing realism sometimes it makes things more complex in a game. The easiest answer is to get adjustable brightness for the scope reticles so they can have a day and a night mode ... it's on the 1.2 figure-out-how-to-do list anyway, perhaps triggered by turning on NVGs. Green lasers and sights from B&S also get washed out but red do not (as much) due to the YUV conversion that I use to pack the image data into a single channel in order to manipulate the lightmap and albedo in the other two color channels.

Reply Good karma+2 votes
Valley_of_Snow
Valley_of_Snow - - 39 comments

I hope you're able to keep making progress on your mod and don't run into any more issues now that you've gotten it into a state you're happy with. I was able to add v1.0.1 to my extensive load-order today thanks to the newly found compatibility for other mods, including shader-based 2d scopes and if I'm not misremembering, Food, Drugs & Drinks animations and perhaps Groks masks. I've played with it a little more since installation and noticed binoculars have trouble displaying properly under NVG unless you activate it post-zoom.

I'll try to keep track of any other issues I may find during testing, and I'm eager to see what else you do, Beef's NVG's or otherwise. :D

Edit: Just a stray thought, but perhaps either as a part of or post-release of v1.2, you could redo binoculars entirely as an optional addon as they have NVG upgrades. It occurred to me when I saw you were also considering tweaking other devices/items.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

I've added fixing the binoculars to the todo list for 1.1, thanks for the heads up

As far as the long term nvg upgrades for bino stuff, its also a pretty good idea, but I have to keep 'scope creep' or whatever its called within check, so that I finish what's in front of me before adding too much to the todo list, but its not a bad idea. Thanks for sharing :)

Reply Good karma+1 vote
bandit1379
bandit1379 - - 64 comments

This is awesome great work! Adjusting brightness is wonderful, would it be possible to add a sound to that?

Definitely looking forward to the fix for those thermal colors, at least turning scope_blur_inner to 0 is a quick temporary fix. I'm not sure if you already know, but there seems to be a bug where if you have NVG on and then look through the binoculars, it's just black. Works find if you look through binocs and then turn NVG on. Maybe just me.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

In next update the shader scopes patch will keep your original scope_blur_inner value when you don't have nvgs, and disable it when you are using nvgs, then restore it afterwards.

Adding a sound to brightness adjustment is a good idea, I've added it to the v1.1 todo list

I also added fixing the binocular error to the 1.1 todo list.

Reply Good karma+2 votes
bandit1379
bandit1379 - - 64 comments

Hey think I found another lil bug, using Gen 3 night vision & if I zoom in it changes from a quad tube to a single tube, same if I switch from scope to iron sights with Alternate Aim mod. When I zoom back out it switches back to a quad tube. If I zoom in then turn NVG on, it's quad tube with the thermal-looking colors outside, but when I zoom out and zoom back in it's back to single tube. (I don't remember if that was happening a few days ago when I installed, but don't think I changed anything either.)

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

I did this when shader scopes is enabled as my only real option with shader 2d scopes because there's some conflict with the two shaders that I can't easily resolve, so when you zoom in and shader scopes takes over it needs to switch to a single tube or the data packing gets displayed instead of the actual NVG image.

I've got some progress to make on differentiating between the shader 2d scopes and ironsights

Reply Good karma+2 votes
bandit1379
bandit1379 - - 64 comments

That's better than nothing or wonky colors I suppose. Would it be possible to make it differentiate between scoping in with the scope and scoping in with iron sights through Alt. Aim mod? If not, same as above...

(Normal iron sights with no scope attached work fine, to clarify.)

Bloodsucker's seem to have the washout effect from lights applied to them when they are cloaked, makes those suckers even easier to kill with NVG, unfortunately.
I.imgur.com

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

I'll take a look at the alt sights

As far as bloodsuckers...damn

I'll see if I can do anything about this, but if not then I'm gonna chalk it up some explanation like 'their skin absorbs visible light and emits it in NIR band so that they can become invisible but if you're wearing NVGs then they show up better' or some **** and call it a feature not a bug ;)

Reply Good karma+1 vote
bandit1379
bandit1379 - - 64 comments

"call it a feature not a bug ;)"

Yes, I am familiar with the S.T.A.L.K.E.R. games =P

Honestly it is still a little difficult and jarring, you go from able to track them when they are invisible to suddenly having to adjust to them not being a washed out blob when they get closer and attack. Especially difficult if there are other washed out blobs of light around you.

Reply Good karma Bad karma+1 vote
Analyzing_Surveyor
Analyzing_Surveyor - - 32 comments

Question, is there a way to change the colors of each generation? I kinda digged the way My Little NVGs did the colors for each generation so I thought that it would be nice to change Gen 2's green hue to a blue hue and change Gen 3's blue hue to a white hue.

Reply Good karma Bad karma+1 vote
Analyzing_Surveyor
Analyzing_Surveyor - - 32 comments

Nevermind, trawled the comments for the v0.9 version, didn't know that night_vision.h had all of the variables I would need to change toa adjust each generation's color. Now I feel a bit like a dummy, especially since I tried to open the .ps files with GIMP, lol,

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

No worries, in 1.2 after some of the other shader mods reduce the number of shader params they use, I'd like to add MCM sliders or options to adjust each NVG generation color settings so no editing of night_vision.h is necessary. However, even with data packing, it requires at least 2 more shader_params to be available to fit all the stuff I'd like so it won't be in the next patch just yet so that I don't hog up all the space.

If you made your own color setting that you like the look of, I'd love to hear what you ended up.

Reply Good karma+1 vote
Analyzing_Surveyor
Analyzing_Surveyor - - 32 comments

I just copied the examples you had typed down under the saturation values, lmao.

I recognized that it was using RGB but I was unfamiliar with how the numbers worked (used to the RGB code of 255,255,255 for example, not the numbers of 1.0,1.0,1.0) so I just aped what I saw.

EDIT: Also appreciate your work man! Its nice that you have everything commented out in night_vision.h.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

Take the 0 to 255 number that you choose in RGB scheme (say 155) and divide by 255. It'll give you a number between 0 and 1, and that's what shaders can take for inputs.

Reply Good karma+2 votes
rib_the_loner
rib_the_loner - - 66 comments

Hey beef how exactly do I clean uninstall the original shader based NVGs. I don't use MO2 for stalker.

Reply Good karma Bad karma+1 vote
rib_the_loner
rib_the_loner - - 66 comments

Never mind I got it to work because I am pro manual installer. Only thing left is that BaS sights are blown out like every other light source but somehow I was able to turn off the illumination on the reticle?? The illumination came back however. Could you make an optional patch for BaS sights or some key bind to illuminate your sights because that definitely seemed like a feature.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

I have some ideas for later, but for now as some others noted above simple increase the washout threshold until your sights no longer washout.

Reply Good karma+2 votes
AyeBlin
AyeBlin - - 365 comments

Could you do NVG Aim Down Sights pistol only? Thank you in advance

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

Hmm I guess that's not unreasonable, as it somewhat splits the middle. Probably in 1.2 as I'd like to release 1.1 sometime sooner than later and I have a lot on the todo list still. Assuming it's fairly quick like a IsClassPistol(obj) sort of check yeah, and I may consider expanding it into an ADS all sights, ADS iron sights, ADS pistol only or something similar ...

Reply Good karma+2 votes
L4U6H1N6-LUN4T1C
L4U6H1N6-LUN4T1C - - 1,183 comments

Hi Beef, awesome mod!!!! I have one question (and it might have been asked before): Can we have a setting in MCM to adjust the blurryness of people etc. while using the NVGs? I like that objects are blurry, but it's a bit too much for me. Maybe a slider or so would be nice...
just an idea.
cheers!

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

It's planned for v1.2 to get a 'disable dof' setting into MCM ... just have to figure out how to pack more data into the same number of floats is all ...

Reply Good karma+2 votes
L4U6H1N6-LUN4T1C
L4U6H1N6-LUN4T1C - - 1,183 comments

cool! But "disable" might be a bit too strong for my taste. A slider would give more flexibility. but I understand it's also a lot more work!!

Reply Good karma Bad karma+2 votes
theRealBeef Author
theRealBeef - - 271 comments

In the meantime, if you're feeling experimental, you can decrease this value I've circled in pp_blur.ps.

Change it from
float scale = 0.3f;
to something like
float scale = 0.15f;
and it will decrease the total 'amount' of blur slightly.

Link to screencap: Imgur.com

I've minified the shader a bit just to be able to see the bigger picture when putting all the shaders together, but if you're curious about the original blur, it's an implementation of my `IGN + Vogel - Chaos` blur that you can see on Shadertoy (Link: Shadertoy.com). Pass 1 here takes Luma and Lightmap and adds a blurred depth buffer to the blue component of RGB image in order to provide a slight 'halo' around objects in second pass of DOF so it's not a sharp cutoff, and pass 2 is the actual 'blur'.

Reply Good karma+1 vote
L4U6H1N6-LUN4T1C
L4U6H1N6-LUN4T1C - - 1,183 comments

wow. that is very impressive! I'll play around with the float scale a little!

Reply Good karma Bad karma+1 vote
Guest
Guest - - 699,993 comments

Excellent mod! Only a little hint: when aiming through a scope the nvg turns off but it can be reactivated by pressing "n" again. I think this needs a restriction. An the nvg should not turn off when aiming with irons sights or a kobra scope...

Reply Good karma Bad karma0 votes
theRealBeef Author
theRealBeef - - 271 comments

In the MCM options you can determine whether NVGs stay on while ADS or not.

That you can 'override' it is a good bug, I need another check there, thanks :)

Also, being able to select whether it stays on in iron sights / optics / etc is a further step that I'd like to take, but probably in 1.2 since I'm not yet sure how to differentiate between scopes / ironsights.

In general, aiming down sights with night vision is basically impossible IRL due to the limited depth of field that they present, and is why IR lasers are the norm for night operations. (Or actual weapon mounted night vision / thermal scopes). When B&S gives the ability to turn on/off lasers for weapons (Haruka already coded this) it'll be a lot more useful feature as well.

Reply Good karma+1 vote
scuttle0815
scuttle0815 - - 3 comments

Now, i have an account :)
Thanks for your reply! With "2d shaderbased scopes" i found out it is possible to differentiate between ironsights,kobra and scopes... in the script "fakelens.script" the mod is searching for the scopesRadii value. If it doesnt find a value then it is an ironsight. Maybe this is an approach... Speaking of 2dshaderscopes, i solved the issue with the night scopes with the help of the "night scopes toggle" mod. The key is to set the scope_factor to 1.0 while aiming. It works well.

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

Thanks for the extra feedback, it could turn out helpful for next update :)

Reply Good karma+1 vote
Dipsy85
Dipsy85 - - 5 comments

Wow, 1.0.1 is such a massive improvement over 0.9, thanks Beef, I love it!

Reply Good karma Bad karma+1 vote
Guest
Guest - - 699,993 comments

The biggest disappointment for me was putting on nvgs for the first time and absolutely hating them. 9.5/10, muh realism

Reply Good karma Bad karma+2 votes
makeFlinTcry
makeFlinTcry - - 11 comments

! c:/s.t.a.l.k.e.r. anomaly\appdata\shaders_cache\r4\pp_blur.ps\2048111100110000001000100000110334112110141000
! error: common_functions.h(54,34): warning X3206: implicit truncation of vector type
common_functions.h(74,2): warning X3206: implicit truncation of vector type
common_functions.h(79,49): warning X3206: implicit truncation of vector type
common_functions.h(111,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(2,17): error X3003: redefinition of 'shader_param_8'

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

If you have a redefinition of `shader_param_8`, then there's some conflict with another shader. (The other warnings are all vanilla issues, but are warnings not errors)

Some of the possible solutions I've come across with others
- Make sure you disabled v0.9 completely
- Make sure you aren't using B&S NV scopes that rely on v0.9
- Make sure you aren't using the NVG patch from ES or Glossy SSR, since their included NVG patches are for v0.9.

Reply Good karma+1 vote
flint112
flint112 - - 9 comments

Love it. Would love an option for fisheye optic for the true realism so aiming is more difficult, because I hate myself.

11/10 How can ppl play without this

Reply Good karma Bad karma+3 votes
theRealBeef Author
theRealBeef - - 271 comments

Hmm, a fisheye optic is something I hadn't though about, not sure how it would look but it sounds kind of cool. I put it on the intriguing ideas list to look at after 1.1 is done. Also not sure how it would effectively be applied with dual or quad NVGs. Interesting idea nonetheless

Reply Good karma+2 votes
flint112
flint112 - - 9 comments

So Gen 1 NVGs have the fisheye optic because of crappy lenses, it's rare to see that in Gen 2 and Gen. For extra realism you could also add artifacts on Gen 1 NVGs. I know you can add Textures on ReShade but I'm not sure how it goes with NVGs.

When I talk about artifacts in NVGs I'm meaning blemishes and Black Spots. They are smol bois you mainly notice when looking on a plane field but they're there. Manufacturing issues

About Gen 2 and 3 - afaik and that's info from my comrade who's been serving a bit longer than me - Gen 2 and 3 are basically made to be of good quality. So basically crappy lenses, artifacts will be rarer on Gen2 and pretty much non-existent on Gen3 NVGs. Hope I could add some more insight

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

Thanks, this is all helpful - I'm basing Gen 1/2/3 in-game off of gen 2/3/3+ IRL, if its worth something to you. An actual "gen 1" sort of device is basically worthless without IR illuminator.

I would like to incorporate autogating as well into the in-game gen2 and gen3 devices, but that will come later.

Reply Good karma+1 vote
jskblur
jskblur - - 4 comments

Hey there Beef, idk how to describe the problem per se, but long story short:

Im using the mods:
* Tacticool Scopes
* Shader Driven Scopes
* this fix:https://www.moddb.com/mods/stalker-anomaly/addons/shader-based-2d-scopes-radius-fix-for-tacticool-scopes
and your mod... with patches for ES + SSR

For some weird reason, the "fix" it's not working when i toggle NVG ON, the shader is bigger than the scope image, it doesn't happen when ADS with NVG OFF... tried playing with the load order a little but no luck...

EDIT: added some images:

Imgur.com

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

Hey, thanks for providing an image since it helps a lot trying to figure out what's going on.

Assuming you've got the "Shader Driven Scopes" compatibility enabled in the MCM menu, the issue is going to be that the radius isn't correct.

When you ADS with the NVGs enabled and Shader Scopes Compat clicked in MCM menu (and have the 'allowed to ADS with nvgs'), the NVG reads the same radius file that Shader Driven Scopes uses for its stuff, in order to match it. If the NVGs are showing up outside, then most likely either the radius isn't set right in file or the compatibility isn't checked.

A final possibility is that the callbacks weren't working right on some systems (which I fixed in v1.1.1) and this could be the source.

Let me know how it goes and what fixed it :)

Reply Good karma+1 vote
jskblur
jskblur - - 4 comments

heya Beef!, forgot the mention that, the MCM option is enabled, this "behaviour" was introduced when i updated to the last version of this mod, wasn't happening before. Also i tried to move the "fix" file alone to the folder of your mod, and nothing. lol.

i can live with it, no worries, just letting u know hehe

Reply Good karma Bad karma+1 vote
jskblur
jskblur - - 4 comments

I just deleted shaders cache and BAM! everything is fine now! thanks beef!

Reply Good karma Bad karma+1 vote
Theo_the_Dog
Theo_the_Dog - - 178 comments

Really nice additions with the recent updates! Great work!

Reply Good karma Bad karma+1 vote
ZeD_MnizD
ZeD_MnizD - - 288 comments

with the latest update found FPS drops (10)

Reply Good karma Bad karma+2 votes
theRealBeef Author
theRealBeef - - 271 comments

FPS drops with NVGs enabled or disabled? And do you have Glossy SSR?

If FPS drops are regardless of NVG state, its because I messed up the math for Glossy SSR Patch in previous version when trying to disable SSR inside NVG radius (since it makes extra washout), and the FPS drops can be associated with the SSR.

Nothing substantial changed on the shader side, just adding a couple of floats that can be adjusted by console, and on LUA side there isn't any 'heavy' function running.

Reply Good karma+1 vote
ZeD_MnizD
ZeD_MnizD - - 288 comments

For testing, I left only your addon active. FPS drops remained. This started in version 1.1.1. Before that, everything was fine.

Reply Good karma Bad karma+2 votes
theRealBeef Author
theRealBeef - - 271 comments

This is too vague to go on - do your FPS drops occur with NVGs turned on or turned off? There's nothing changed in shaders that could possibly take an additional 3ish milliseconds (the difference between 60 and 50 FPS, since you didn't indicate what the drop is to/from).

So if it does occur, it would have to be LUA related, and unless unregistering callbacks that are not in-use somehow negatively impacts performance, which seems not likely since it completely disables the script when NVGs are turned off, then I'm not so sure it's related to this mod, but instead to the hundreds of other settings that you can change in Anomaly

Reply Good karma+1 vote
ZeD_MnizD
ZeD_MnizD - - 288 comments

Fps drops when NVG is turned on. There are no addons that change shaders.

Reply Good karma Bad karma+2 votes
Deathbringer228
Deathbringer228 - - 95 comments

Same problem

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

ZeD_MnizD "Fps drops" is about as helpful as stating "game crashes" or "computer running".

Without the detail I've asked you for this is a meaningless statement and the fact we're 3 messages deep without numbers is wasting my time.

Of course there is a cost to turning on NVGs - as an example I drop from 55 to 52 FPS in Cordon when turning on NVGs, but its the same cost as it was in 1.0.1 as it is in 1.1.1.

If you claim there is some difference in the performance of 1.0.1 and 1.1.1, then stick with 1.0.1 until you can provide better information.

Reply Good karma+1 vote
ZeD_MnizD
ZeD_MnizD - - 288 comments

(Google translate)
I repeat. For testing, I launched Anomaly only with your add-on, without Glossy SSR and other add-ons that change shaders. The fall in FPS occurs when the NVG is turned on. What other additional information do you need?

Reply Good karma Bad karma+1 vote
theRealBeef Author
theRealBeef - - 271 comments

The framerate you get without NVG turned on, and with NVG turned on please. If you can, the same values but for 1.0.1 as well, since you say there is a difference.

To understand why I need this - the NVG shader runs in ~1.05ms on my Nvidia 970m with DX11. There will always be some level of 'cost' with the additional visual effects. With a bunch of other visual mods, and most visual settings maxed is the difference between 55 and 52FPS, but if I have all the graphical settings lowered down, it is also the difference between 120 and 107FPS, because the NVG shader takes the same amount of time regardless.

But the performance difference seems larger when you are losing 13FPS at a high framerate vs losing 3 FPS at a low framerate. Without some kind of context I can't know if there's a problem or not that needs to be resolved.

For comparison's sake, in Reshade the PPFXBloom takes 1.7ms to run.

Reply Good karma+1 vote
ZeD_MnizD
ZeD_MnizD - - 288 comments

I am sending you screenshots.if you need some other way of demonstration, please inform.
Drive.google.com

Reply Good karma Bad karma+1 vote
Post a comment
Tags