New Vegas Reloaded (NVR) Wiki
website·Indexed 31 days ago
https://dlpnd.github.io/nvr-wiki/Documentation for New Vegas Reloaded (NVR), featuring installation guides, a FAQ for editing settings, and detailed references for shaders including PBR, Volumetric Fog, Depth of Field, and Tonemapping. Includes a technical tutorial for porting shaders to NVR using HLSL, Visual Studio, and ShaderManager.cpp.
What's inside New Vegas Reloaded
- New Vegas Reloaded is a highly configurable graphics extender for Fallout: New Vegas. It enables a wide range of advanced visual effects, including Ambient Occlusion, Bloom, Shadows, Depth of Field, Tonemapping, Volumetric Fog, God Rays, Coloring, Precipitation Effects (Rain/Snow Accumulation), and enhanced Water (Surface and Underwater) effects.
Understand NVR shader file types
New Vegas Reloaded (NVR) uses two types of shader files:
.fx.hlsl: Contains the source code. This is the file developers edit..fx: The compiled version of the shader. The NVR framework automatically compiles.fx.hlslfiles into.fxfiles at runtime for rendering.
Update shader constants in ShaderManager.cpp
To pass values from the NVR configuration (.toml) to a shader, you must implement logic within
ShaderManager::UpdateConstants().Key implementation details:
- Placement: Place the logic outside of the
if (TheSettingManager->SettingsChanged)block if the shader requires continuous updates for day/night or interior/exterior transitions. - Activation Check: Wrap the logic in a check to see if the effect is enabled (e.g.,
if (Effects.YourEffectName->Enabled)). - Reading Settings: Use
TheSettingManager->GetSettingF(category, key)to retrieve floating-point values from the TOML file. - Handling Environment Transitions: Use the
lerp()function to blend between 'Day' and 'Night' settings based on theisDayTimevariable for exterior locations. Use a simple assignment for interior locations via theisExteriorcheck.
if (Effects.LiftGammaGain->Enabled) { if (isExterior) { // Blend between Night and Day settings based on time of day ShaderConst.LiftGammaGain.LiftGamma.x = lerp( TheSettingManager->GetSettingF("Shaders.SweetFXLiftGammaGain.Night", "LiftRed"), TheSettingManager->GetSettingF("Shaders.SweetFXLiftGammaGain.Day", "LiftRed"), isDayTime ); // ... repeat for other channels (y, z, w) } else { // Use static Interior settings ShaderConst.LiftGammaGain.LiftGamma.x = TheSettingManager->GetSettingF("Shaders.SweetFXLiftGammaGain.Interior", "LiftRed"); // ... repeat for other channels } }- Placement: Place the logic outside of the
Prerequisites for installing New Vegas Reloaded
Before installing New Vegas Reloaded (NVR), ensure you have the following components installed. Note that only Steam, GOG, or Epic Games versions of Fallout New Vegas are supported by xNVSE.Install New Vegas Reloaded using Mod Organizer 2
To install New Vegas Reloaded, use Mod Organizer 2 (MO2) to manage the files and installation process.Install NVR presets
Presets should be placed in theNewVegasReloaded\nvse\Pluginsdirectory. For users of Mod Organizer 2 (MO2), it is recommended to create a new mod with the folder structurenvse/Pluginsand place the preset inside that structure.Prepare a third-party HLSL shader for NVR porting
When porting a shader (e.g., from SweetFX or ReShade), you must perform the following cleanup on the HLSL code before integrating it into NVR:
- Remove UI Metadata: Strip out framework-specific UI annotations (e.g.,
__UNIFORM_SLIDER_FLOAT3,ui_label,ui_tooltip). - Rename Variables: All uniform variables must be renamed to include the
TESR_prefix to comply with NVR's naming convention. - Update Logic: Update the effect code to reference the new
TESR_prefixed variable names.
- Remove UI Metadata: Strip out framework-specific UI annotations (e.g.,
Install and configure ReShade with NVR and dxvk
To use ReShade and dxvk together with NVR, follow this specific installation order:
- Install NVR.
- Install dxvk.
- Install the latest ReShade and select the
Vulkanoption during installation. - Disable
MSAAin both the game launcher and NVR (required for Depth Buffer effects).
If the depth buffer is at the wrong resolution, calculate the ratio (Depth Buffer Height / Game Height) and add
Reshade_Depth_input_y_scaleto your ReShade global processor definition with that value.Define shader variable structures in ShaderManager.h
To integrate shader variables into the C++ engine, you must modify
ShaderManager.hin three steps:- Create a struct: Define a new struct inside
struct ShaderConstantsto hold the variables. UseD3DXVECTOR4for HLSLfloat4types andfloatfor HLSLfloattypes. - Declare the property: At the end of
struct ShaderConstants, declare an instance of your new struct. - Add to EffectsStruct: Add a pointer to the effect (alphabetically ordered) inside
struct EffectsStructusing theEffectRecord*type.
// 1. Inside struct ShaderConstants struct LiftGammaGainStruct { D3DXVECTOR4 LiftGamma; D3DXVECTOR4 GammaGain; float Gain; }; // 2. At the end of struct ShaderConstants LiftGammaGainStruct LiftGammaGain; // 3. Inside struct EffectsStruct EffectRecord* LiftGammaGain;- Create a struct: Define a new struct inside
Set up the development environment for New Vegas Reloaded shader porting
To port shaders to New Vegas Reloaded (NVR), you need the following tools installed:
- Git: For downloading the source code.
- Visual Studio Community 2019: For editing and compiling the C++ source.
- HLSL Tools for Visual Studio: An extension to facilitate editing shader code.
- Notepad++: Recommended for editing
.tomlsettings files.
To clone the source code, run the following command in Git Bash:
git clone -b nightly https://github.com/mchaptel/TESReloaded10.git --recurse-submodules --remote-submodulesgit clone -b nightly https://github.com/mchaptel/TESReloaded10.git --recurse-submodules --remote-submodulesInstall New Vegas Reloaded
New Vegas Reloaded is installed using a standard mod manager. Because the extender can be performance-intensive, it is highly recommended to implement performance optimizations (such as those found in WallSogB's Fallout New Vegas Performance Guide) before installation.Download the latest version of New Vegas Reloaded
New Vegas Reloaded is officially distributed via Discord. It is highly recommended to use the latest nightly build from the TES Reloaded Discord. Avoid versions found on the Nexus or version 3.14, as they are outdated and unsupported by current maintainers.