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.
* Breaking News*
New update in the works. I won't hit everything on the roadmap listed in first comment but will additionally add DX8/9 support (minus some features that are computationally expensive), as well as some other fixes.
Thanks to F.E.A.R and Haruka for Russian translation
Introduces a shader based NVG effect to Stalker Anomaly, instead of the more limited .ppe effect. Currently replaces Gen1 thru Gen3 head mounted NVG effects. Can be expanded by modders to create additional effects, such as non-fullscreen NVG scopes and other possibilities.
New Keybinding: Long press "N" (or your nightvision keybind) to enable/disable NVGs, short press to adjust brightness
Follow future developments at Github.com
**********************************************
MUST READ THIS SECTION
**********************************************
Functions on DX10/11 only - future DX8/9 compatibility is possible, but I'm not touching it just yet.
After installing this mod or making any adjustments to night_vision.h, you must restart the game and select DELETE SHADER CACHE or changes will not take effect. The Anomaly launcher recompiles its shaders from the gamedata/shaders folder ONLY if this option is checked. Once you have done this once, you will not need to do it again unless you make changes to head_mounted_nvg_shader.h or other shaders.
**********************************************
END MUST READ
**********************************************
Installation Steps:
- If you have Glossy SSR, Enhanced Shaders, Arszi Rad overhaul, place these before Beef's NVGs
- Install Beef's NVGs
- If you are using Glossy SSR and Enhanced shaders, , use the included patch. now (currently the patch included with those mods is for NVG v0.9 and will not work)
- If you are using Enhanced shaders but not glossy SSR, use the included patch now.
- If you are using Glossy SSR but not enhanced shaders, use the included patch now.
- If you are using Arszi's rad overhaul, use the included patch now.
- Configure MCM
- Calibration per-PC is still in its draft stage, a better process is in the works but this is one way to do it.
- First, load up in debug mode
- In MCM menu, turn min gain as high as it goes, and max gain as low as it goes
- Go outdoors in some map and change the weather to clear_1 and time to midnight
- Turn on Gen 3 NVGs and adjust the gain offset higher or lower until the moonlight on the ground and buildings just barely doesn't wash out - after changing MCM setting you have to turn off and back on the NVGs for it to take effect
- Change the weather to cloudy_2_dark change max gain to 2, then turn off and on the NVGs. Quick press N until you are at the brightest setting. You should be able to see outside "ok" with Gen 3 but somewhat poorly with gen 1 and gen 2. If you want more brightness you can increase max gain slightly more. If you want to focus on 'gameplay' and don't like the 'realism' then go back to step 5 and increase your gain offset so that the 'base' brightness is higher, then come back to step 6 and so on.
- Change the time to noon and keep the weather on cloudy_2_dark. Quick press N until you are at the lowest setting. Adjust the min gain in MCM lower until you can see during the day (should be somewhere between 0.3 and 0.5 generally)
- Adjust the number of tubes per generation as you see fit, as well as the overlays you want
- Close out the game and turn debug mode back off, and you shouldn't need to adjust NVGs any more other than with a quick press of the nightvision keybind when you enter bright or dark areas.
- Profit
Intent:
I want to create NVGs for Stalker that mirror real-life NVGs, without overdoing it. Likewise, I also want these NVGs to be highly configurable, to allow users to edit them without having to dig through files to change lines of code. To achieve this, I created this shader-based NVG effect to fill what I saw as a missing piece of the Stalker experience.
v1.1.1 Chagelog:
- Fixed small chance of NVG's enabling before RegisterScriptCallback completed, causing the NVGs to get stuck in the "up" position, thanks to Lenny for coming across this
v1.1 Changelog:
- Now uses renamed folder structure from Mr Minotaur for better compatibility with MO2 and future updates.
- Added NVG turn-on animations
- Added NVG shader animations
- Now requires shader_param_7, so its 100% not compatible with Enhanced Shaders Color Grading full shader controls, only the simple controls (or no controls)
- Added controls for radius and vertical positioning of NVGS (for animation / scope compatibility)
- Improved compatibility with Shader Based 2d Scopes (alternate sights still need fixing)
- Improve performance potentially by unregistering unused callbacks when NVGs are disabled
- Added additional checks to prevent issues when turning on / off NVGs while ADS and other actions
- Fixed issue with glossy SSR patch
- Fixed binocular compatibility
- Added sound to brightness adjustment action
v1.0.1 Changelog:
- Added compatibility option for Shader Based 2d Scopes into MCM menu
v1.0 Changelog:
- Complete rewrite, added MCM Support
- Separated image / lightmap /albedo as inputs to rendering
- Updated comments in night_vision.h for advanced user-adjustable settings
- Added separate sky adjustment to night_vision.h
- Glitch effect from blowouts added
- Auto-turn off NVG when PDA opened functionality (MCM configurable)
- Prevent NVG's from enabling when ADS (MCM configurable)
- Compatibility with Glossy SSR / Enhanced shaders
- Russian localization
- Ability to set the number of tubes in each generation (MCM configurable)
- Probably a lot more that I forgot
Previous Changelog:
- v0.9 - complete rewrite, introduces tons of new bugs, but improves performance/adjustability
- v0.85 - updated for RC19 compatibility - patches may be out of date
- v0.84 - updated all compatibility patches for Feel_Fried's animations
- v0.83 - version update for the people who downloaded .82 before I ninja-updated an error
- v0.82 - added compatibility patch for Nav's Definitive Masks
- v0.81 - added two new configurations, brighter and brighter+arcade
- v0.8 - fixed distortion, improved effects, implemented new features, uploaded to MODDB
Добрый автор, приди и помоги. После того как я впервые взял в руки пнв и включил, это была пнв первого поколения, я не смог её отключить, я снимал пнв в инвента��е, загружался на прошлый сейв, где пнв не было, удалял мод. Всё осталось по-прежнему. Помогите!
God all the time wasted not using this mod.... thanks!
This comment is currently awaiting admin approval, join now to view.
For some reason when i turn on the NVGs and use 2d sights the game ***** itself and crashes (even when the 2d sights option is enabled)
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: f:/anomaly\gamedata\scripts\z_beefs_nvgs.script:444: attempt to index global 'scopeRadii' (a nil value)
stack trace:
i got this issue too
This is due to having compatibility for 2d shader scopes enabled without having the mod
This is due to having compatibility for 2d shader scopes enabled without having the mod
So insanely realistic, it's wild to see when the clouds come out or it gets foggy or a storm rolls in and all the moonlight is obstructed. Those Gen 1 loses viability and the Gen 2 & 3 shines with the low light as they should. I own a PVS-14 and it's shocking how detailed you made this mod. The realism is so impressive even giving the user the ability to change which eye the Gen 1 is viewed from. I'm still blown away how you took NVG's from this OP magic color vision to something that is arguably one the most true to life implementations of night vision in a game to date. 10/10
Note : It would be awesome if the headlamp/torch on the NVG's worked as an IR illumination device, making it viable for stealth. Would it be possible to change the NVG headlamps to a non-visable light or would that be impossible shader/lighting wise?.
Hello Beef,
I've been trying to fix this issue for a few days now. So I am using Shader Based 2D scopes with SSR and Enhanced Shaders or at least I'm trying to. Thing is, the game worked...for about 5 minutes until I tried to change settings and it all went to hell again.
In any case, the error it gives me is in the log is as follows:
combine_1.ps(98,4): error X3017: cannot implicitly convert from 'const float3' to 'float4'
compine_1.ps is a file from SSR mod, however, I swear it worked with it somehow previously. I can't quite wrap my head around it right now. Maybe you can shed some light on what's going on here.
Thanks in advance.
why i cant use iron sights or any sight including the 9mm weapons sight?
Hello!
I put the mod after Arszi's Dynamic Radiation Zones, at the same time fixing the aiming with NVG and compatibility of arszi and your mod. But, I could not turn on the NVD. Then I loaded a save and my night vision turned on permanently, pressing the button again didn't work, loading past saves, reloading the game didn't work. The only solution found is to remove the mod and clear the cache, clearing the cache without removing the mod does not solve the problem. There are no errors, just the NVD shader works on top of any windows (inventory, PDA, aiming, etc.).
Also, a user with the nickname Joni-xxx wrote about this above.
Sorry about my language, this is google-translate (:
hello, I can’t understand, this holographic sight should be displayed as a dot on the RPK, but on the shotgun it will be displayed normally. If it shouldn't be, how can it be fixed?
Ibb.co
Ibb.co
Ibb.co
Ibb.co
For some reason my headlight doesnt work lol
Really a brilliant mod, honestly. Awesome look and toggle functionality.
Have no problems with it whatsoever so in this regard of functionality it's a charm, but.
NVG Gen3 scope has this turquoise light to it where I really much more preferred to be honest game's default ''white'' light or white NVG.
Is it possible to change the colors or color on NVG Gen3 to game or Anomaly's default of white NVG please? That would be awesome, maybe not ''realistic'' but today, almost anything is possible... I think. Right?
*Edit, I found this MOD's addon that just does what I wished for...
Now rests me the question if there's a possibility to have the NV turn on/off directly instead of having to go through the animations thereof.
Flashlight I don't mind so much but also that would be cool (and very useful, it's basically a question of comfort and kind of life and death in game at least) if it was also available to instantly toggle those on/off as well.
Ehm, edit again looking into cfg files (scripts) r/n. This might work though.
Beef I'll sacrifice a child to you if you can make this run on DX9.
This comment is currently awaiting admin approval, join now to view.
Will it be ported to DX8/9 ?
id say its unlikely
Hello! I have one conflict with addon Moddb.com
gamedata/shaders/r3/combine_1.ps
The night vision disables whenever I aim, might wanna fix that. Did what I could, installed it correctly, deleted shader cache. Not sure what I'm doing wrong.
This comment is currently awaiting admin approval, join now to view.
Hey why cant I aim with night vision?
ayo i got this error when i installed this mod for first time
! f:/other games/s.t.a.l.k.e.r. anomaly\appdata\shaders_cache\r4\pp_blur.ps\1536111100110000001000100000110231113010000000
! error: common_functions.h(43,34): warning X3206: implicit truncation of vector type
common_functions.h(63,2): warning X3206: implicit truncation of vector type
common_functions.h(68,49): warning X3206: implicit truncation of vector type
common_functions.h(100,2): warning X3206: implicit truncation of vector type
(12,41): error X3004: undeclared identifier 'shader_param_8'
what is the causes lol
I'm having the same issue.
this is two years old and i'm still not entirely sure on the specific issue at hand.
but a temporary/jurry rigged solution I found was that it was something to do with the "Night_vision.h" file. Specifically whenever i update the modded exe's the new/updated "Night_vision.h" crashes the game.
if i use one from before the crashes started then it works fine.
sadly i'm not even sure which one is the old one because it's been so long of me replacing the night_vision.h to make sure beefs NVG's works
Klean discussion about EFT tarkov points about hoping addition for peripheral vision like this and agreed to one comment that this similar mechanic should be on Escape From Tarkov
I did a clean Anomaly install, installed mods with MO2 and got this error:
! c:/stalker anomaly\appdata\shaders_cache\r4\pp_blur.ps\2048111100110000001000100000110231113010000000
! 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
(12,41): error X3004: undeclared identifier 'shader_param_8'
Here is my list of mods:
#Mod_Priority,#Mod_Status,#Mod_Name
"0000","+","6x_AI_Upsc_Mutant_Texs_"
"0001","+","Anomaly_1.5.1._Performance_Textures_Pack"
"0002","+","Anomaly HD Models Lite"
"0004","+","Boomsticks and Sharpsticks 28-Nov-2021"
"0005","+","HollywoodFX 2.0 MinimalisticFX"
"0006","+","Simple_Wall_texture_change"
"0007","+","T.H.A.P._Rework_2.1"
"0008","+","FLIR_NV_Anomaly.1.7"
"0009","+","Hellblau_Optics_-_Update_3"
"0010","+","MCM1.6.4"
"0011","+","Soundscape_Overhaul_"
"0012","+","JSRS_Port_3.6_Sound_Overhaul"
"0013","+","Aim, interface, jump, nvg_sounds_by_YUNGPR1NCEv2.1"
"0014","+","General_Fire_Mode_Switcher_Sound.12 + JSRS patch"
"0015","+","Bullet_cracks_and_impact_sounds_1.5.1"
"0016","+","Quieter_Wood_Box_Breaking"
"0017","+","AQVASAdditional_quality_voice_acting_for_stalkers.1"
"0018","+","Sound Mod - Injury Audio Extended"
"0019","+","TBs_Angry_Chimera_Growls_v1.0"
"0020","+","Desmans_Horror_Overhaul.2"
"0021","+","Knife, Bolt and Grenade Holster Sounds 1.5.1"
"0022","+","Reners_PDA_Renewed_v1.3"
"0023","+","Beef's NVGs.1"
"0024","+","Enhanced_Shaders_Color_Grading_1.09 (No PBR + corrected cubemaps)"
"0025","+","Beef's NVGs - Patch (Only Enhanced Shaders No SSR)"
"0026","+","ScreenSpaceShaders_Update6.3"
"0027","+","ScreenSpaceShaders_Update6.3 patch ES and Beef's NVGs"
"0028","+","Majestic_Weatherfx_1.1.2"
"0029","+","Dialogue_Expanded_v4.1"
"0030","+","Narrative_Loadscreens.1"
"0031","+","Hellblaus_Immersive_Onscreen_Text_1.0"
"0032","+","Trader_Overhaul_1.30"
"0033","+","Trader_Overhaul_1.30 BaS patch"
"0034","+","dph_smart_terrain_fix_2"
"0035","+","player_thermal_resistance"
"0036","+","TBs_Bugged_Stashes_Fix_v1.4"
"0037","+","More_dynamic_tasks_0.2"
"0038","+","EFT-weapon_reposition.10"
"0039","+","EFT-weapon_reposition.10 patch BaS"
"0040","+","EFT-weapon_reposition.10 patch BaS + JSRS"
"0041","+","MagsRedux.2022.06.17"
"0042","+","MagsRedux.2022.06.17 BaS patch"
"0043","+","Count_your_rounds_1.2"
"0044","+","Maximilyan_Icons_pack_1.6"
"0045","+","L96_Reanimation.2 + JSRS patch"
"0046","+","Saiga-12K_Remodel_Rebalance.3 + EFT patch"
"0047","+","SVD_Replacer_Rebalance.4 + EFT patch"
"0048","+","The_G36_Pack.5 + EFT, NPC, and scope patches"
"0049","+","1.7.1_Groks_Balanced_Overhaul_Of_Ballistics_System"
"0050","+","1.7.1_Groks_Balanced_Overhaul_Of_Ballistics_System Enhanced Recoil (BaS)"
"0051","+","1.7.1_Groks_Balanced_Overhaul_Of_Ballistics_System HD Models"
"0052","+","ShaderDrivenScopesV1.3 - DLTX"
"0053","+","Shaders_Based_2D_Scopes_BaS_LEOPULDRADIUSFIX"
"0054","+","Camera_Reanimation_Project_-_I.N.E.R.T.I.A._V1.2"
"0056","+","Fluid_Aim_v1.2.3"
"0057","+","Food_drug_and_drinks_animations_v0.8.9.b_h1"
"0058","+","remade animations"
"0059","+","Lower_Weapon_Sprint_v1.2.0.3"
"0060","+","dph_autolower_weapon_1.4"
"0061","+","small_companion_ui_toggle"
"0062","+","2.0.0_Groks_Body_Health_System_Redux + Ammo check patch"
"0063","+","Tough_Important_NPCs_and_Companions_1_0_3"
"0064","+","ArszisBurerOverhaul1"
"0065","+","ArszisMutantBleeding2_0_1"
"0066","+","Bloodsucker_Cloak"
"0067","+","BountySquadsExpanded_1_0_5"
"0068","+","Controller_effects_0.1"
"0069","+","More_Aggressive_NPC_Looting.1"
"0070","+","Stealth_2.0.1"
"0071","+","TBs_companions_deactivate_headlamps_when_in_stealth_v1.0"
"0072","+","v2.0Stuck_Companions_Workaround"
"0073","+","DYNAMIC_STALKERS_-_GUARDS_V1.2_FOR_ANOMALY.5"
"0074","+","DYNAMIC_MUTANTS_V1.35 + Soundscape Overhaul 3.0 patch"
"0075","+","Dynamic_NOCTURNAL_Mutants_v1.25 + Soundscape Overhaul 3.0 patch"
"0076","+","WarfareALifeOverhaul_1_4_1 + Dynamic Mut, Noct Mut, Dynamic Stalker Guards patch"
"0077","+","Warfare_Mechanic_Fix_v0.2"
"0078","+","Y_F_Fluid_Dynamic_Relations_1_0_5"
How can I solve this?
This comment is currently awaiting admin approval, join now to view.
Also I put Shader based scopes before NVGs
Update
I got rid of Majestic Weatherfx and removed the ReShade files, now the game is working.
I changed the order for some addons and now I'm getting this: (I had the same error as the guy that commented)
! x:/stalker anomaly mods/bin/..\appdata\shaders_cache\r4\pp_blur.ps\2048111100110000000000100000110332113010000000
! 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
night_vision.h(3,17): error X3003: redefinition of 'shader_param_7'
This comment is currently awaiting admin approval, join now to view.
Works with Anomaly 1.5.2 perfectly fine!
when I turn on NVG, My whole screen turns into blue and doesn't come back
You should add an option to change the color on the MCM, or is there already a way to do this? (Could've sworn I read there was a way but can't remember, which is why I'm posting)
This comment is currently awaiting admin approval, join now to view.
Beef's NVG really BASED???
how do i uninstall this? its in my mcm but i cant find it in the mod organizer
I cant turn off my nvgs, even when i turn them off they stays on?
BUG: for me the nvg's have the same brightness curve regardless of generation and make 1st gen just as good as 2nd and 3rd gen. the noise makes no real difference.
I think it should be more like 1st gen barely helps see at night at max power. 2nd gen is much brighter but suffers from heavier noise and a slight blur (due to lower resolution). 3rd gen loweres noise and removes blur.
Imgur.com
its probably not supposed to look like this?
first picture is taken at midday and nighttime is far too dark.
any fix?
edit: fixed it
So I try activate it by hold N but it doesn't active why is that happen?
If you're on the 1.5.2 version of Anomaly then the mod won't work
Delete Shader Cache
Also try holding N to turn it on if you're just pressing it normally.
is dx9 patch cancelled?
idk
nice mod made it work on my old pc but now all i hear is the sound of the nvg and the animation to put the nvg down but there is no texture on the screen nothing just sound
sorry just made it work if you have the same problem delet the cache in the loder and it will work
Базовано
Hi,your NVG is great,can you or somebody help me with disabling blur?
This needs an update to work together with SSS Moddb.com and BaS Moddb.com on their latest updates [02/10/22]