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
Update 17 November:
Alternate sights still need to be fixed, but squashed a fair number of issues and bugs, particularly with shader scopes and got a little bit more functionality in.
Next up on the roadmap:
- Fix alternate sights
- Add 2d overlay functionality
- Reorganize MCM menu into submenus
- Add DOF effect control to MCM
- Add control for # of brightness intervals to MCM
- Dynamic tube control (e.g. able to flip up left half of multi-tube NVGs to see detector while artifact hunting)
- Improve turn-on animations (and perhaps add flip-up animation? I don't want to overdo it)
Second Update (1.1.1 fix) Fixed small chance of Script callbacks not registering correctly.
shader based scopes has a patch in it´s mcm menu
* Breaking News*
New update in the works. I won't hit everything on the roadmap listed in the comment above but will additionally add DX8/9 support (minus some features that are computationally expensive), as well as some other fixes.
Nice buddie,any date in mind? also dont forget to include a turn off animation aswell...take care
Waiting eagerly for DX8/9 update. Thanks for working on it!
how's that coming along? porting the shaders make you consider suicide yet or did you not reach that stage?
PLS add the Digital NV to BEEF'S NVGS
I think also making the Gen3 look more realistic like the real GPNVG-18 lenses look would be cool! check out how they do it in ground branch, pretty realistic!
Oh damn, these... these really make me want to replace My Little NVGs. Oh man, but with 108 mods I have installed, one might not be happy... but it is shader based... hmmmmmmmmm.
Decided to bite the bullet - only thing I had to change in Beef's item script was for the Anomaly Detector since I have Arszis' Anomaly Detector Restored mod.
Funny enough, trying to replace My Little NVGs with my own .ppe effect was where I fell down the rabbit hole of learning shaders and ended up here.
ITS HERE
Do you mind if I post a bug report here or in the Github repository or on the comments?
Never mind, turns out I just incorrectly copied the lines from Arszi's Restored Anomaly Detector item_device.script into your's. Game's working just fine and dandy now - still need to calibrate the brightness but this is certainly cool as hell.
Nice i like, but as of now I use Boomsticks and SharpSticks and the included NVG scopes does not like your new version.
editing shader files is beyond me at this point.
I tried.
Hopefully that gets updated soon. i like the brightness adjustments and auto on off for a pda.
Yeah, the new version has to pack more data into fewer shader_params, so it doesn't play nicely with v0.9 NVG shader.
Creativity 80 lvl, because preview.
You're a real one, Beef. This has loads of options, for casual gamers and realism enthusiasts alike. Right on!
HOLY ****.
I love how now I found another way to die on my 1 life ironman play throughs!
Getting blinded by my own gun's flash!
Use a suppressor to deaden your muzzle flash when wearing NVGs
Yup!
But I won't because I like to torture myself.
video preview: Youtu.be
with shader scope: Youtu.be
Compatibility with shader based 2d scopes is added in new version
Also for others, you can edit some of the 'advanced' settings in night_vision.h for things like changing the colors as Kraizer has done here for B/W vision - I have some example color schemes in that file as well.
i have this problem now with 1.5.2...even if Shader based scopes support is on, the screen still turns purple
I get this too, how do I fix the purple tint of death? I have to reinstall the entire game when this happens
Oooooh man that's so good :D
(Google TL)
I remember that in the old versions there was an animation of turning on the headlamp when the NVG was turned on, when will it be again?
v1.1 I will add some more animations, not just for player character but also for the nvg effect itself, such as flipping up NVG effect
This comment is currently awaiting admin approval, join now to view.
Will it go to the boomstick?
There can be some problem with the boomstick nightvision scopes and the current NVGs, but I don't know if it would crash or simply not work correctly. There will be no issues with the rest of boomsticks, and I am working with Mich to help him with updating his scopes that use my old nv shader to use the new one.
To answer your question more directly,you should have no issue with boomsticks so long as you don't use the NV scopes patch.
Put everything in the correct order and with all the patches, but Pastebin.com
I also use B&S
Something is overwriting either pp_blur.ps or night_vision.h, more likely night_vision.h
As a result, B&S is rewriting night_vision.h, but when corrected, it appears like this
(53,16): error X3013: 'calc_vignette': function does not take 2 parameters
Are you using the NV scopes patch for B&S? If so, that will be the problem, it must be updated to using v1.0's new pipeline. I didn't see this conflict at first since I have been using B&S while testing the NV scopes, and in some ways it is indispensable since it adds lasers to weapons (and the next update of B&S is likely to include the ability to turn on / off lasers)
I have the BaS nv scope patch disabled yet I'm experiencing the same crash.
can u make work for dx8? i realy love your mod
I will make a pared down version for dx8/9 one day, since I don't think I will change the pipeline for a 5th time. Unfortunately, a lot of features will have to be stripped out and refactored to make it work ...
Nice.... I'll gonna try this new version, but I will deactivate the BAS NVG Scope patch, just in case hehe
Привет автор!
столкнулся с проблемой я поставил новую версию beef shadeer nvgs (я пытался зарегаться на imgur но пишет что в моём регионе нельзя) у меня установлено в след порядке
Beefs_Shader_Based_NVG_v1.0.1
Beefs_Shader_Based_NVG_v1.0.1 - Glossy SSR patch
Glossy_SSR_0.13
GLossy_SSR_0.13 water optional
GLossy_SSR_0.13 nvgs patch (на старой)
и не работает на новой версии
а когда на старой было то все работало что делать?
попробуйте этот список
Glossy_SSR_0.13
GLossy_SSR_0.13 water optional
Beefs_Shader_Based_NVG_v1.0.1
Beefs_Shader_Based_NVG_v1.0.1 - Glossy SSR patch
я поставил в таком порядке после чего зашел в игру
создал новую игру и прописал себе 3 фонарика с ночным виденьем проверил каждый нажимаю N но ничего не работает а включается только свет L
Вы удалили кэш шейдеров?
Так же, аддон меняет управление ПНВ:
Для включения/отключения необходимо зажать N.
Короткое нажатие на N регулирует яркость.
Странно я вроде ничего не удалял а нажатие на N не удерживая ничего не происходит и долгое нажатие тоже не работает
Если при длительном нажатии N (более полсекунды) вы слышите шум,но худ ПНВ не отображается, шейдер работает некорректно.
Если при длительном нажатии N (более полсекунды) не включается ни худ ПНВ, ни его звук, ни ночного видения, значит, скрипт работает некорректно возможно его перезаписал другой аддон.
Спасибо большое помогло оказывается теперь на удержание N работает 100/10
Доброй охоты, сталкер
Здравствуйте, а что делать если шейдер работает некорректно?
В лаунчере аномали, под кнопкой Play stalker anomaly, есть пункт 'delete shader cache'. Ставишь галочку на нём и запускаешь игру. Мне помогло
hey theRealBeef, since on you're on fire recently, I have a mod suggestion:
let grenades, anomalies and critical damage attacks have a chance at damaging the side of your equipment you usually take for granted: NVGs, PDAs, flashlights, detectors.
This would make them less of a permanent one-off purchases you take for granted, turning them instead into good succeptible to damage as any other in sometimes very undesirable situations (night escapade far from home where you take a critical hit into your NVGs).
While implementing damage system to those items similar to weapons may be difficult (I don't know, it's a semi-educated guess), two simple alternatives would be to either make such item completely despawn from player inventory (destroyed... puff!) or simply making them loose all their battery charge whenever a check for damage comes back positive.
I always disliked how those things were a one off - once you had them you took them for granted for the remainder of the game, risk-free.