Skip to content

Repository files navigation

FO4 Community Shaders

Modern rendering features for Fallout 4 - upscaling, frame generation, and screen-space lighting - as an open F4SE plugin.

A Fallout 4 port of the ideas in Skyrim Community Shaders, hooking the DirectX renderer directly.

Like upstream, it owns the game's deferred shaders rather than patching them: the deferred lighting and composite permutations are reconstructed as readable HLSL, compiled at runtime, and injected in place of the stock shaders.


CI Version License

Fallout 4 C++23 Platform

Features · Activation · Controls · Building · Compatibility · License

Warning

0.2.0 is active work in progress. Features are incomplete, unstable, unavailable on some systems, or have startup-only options that require a restart. Ordinary enabled and settings changes apply live unless a control says otherwise. There is no packaged release yet; source builds are intended for development and testing.


Requirements

Game Fallout 4 runtime 1.11.240. Older 1.10.x code paths remain in the project but are not currently advertised or validated.
Fallout 4 Script Extender (F4SE) Required.
Address Library for F4SE Required.
Addictol Recommended. All-in-one engine patch (stability, performance, bug fixes) by Dear-Modding-FO4 (includes me), the maintainers of the CommonLibF4 fork this plugin builds on.

Features

Being listed here means the feature is compiled into the plugin, not that it has been fully validated in game. Every feature ships inactive and is opt-in - see activation.

Feature Implementation
Upscaling DLSS and FSR3 upscaling or native AA, with quality modes and sharpening controls. XeSS upscaling is not implemented.
Frame Generation FSR3-FG, DLSS-G, and XeSS-FG through D3D11/D3D12 interop.
Screen Space Shadows Bend screen-space contact/sun shadows via depth raymarch, multiplied into the deferred directional light.
Screen Space GI XeGTAO screen-space ambient occlusion plus a spherical-harmonic indirect diffuse bounce injected into the ambient/IBL pass.
Wetness Effects Rain-driven water film: per-light Fresnel coat, darkened wet albedo, and a wet environment reflection in the deferred lighting and composition passes.
Performance Overlay FPS, frame-time, latency, and backend metrics with configurable layout and graphs.
RenderDoc In-game frame-capture controls for an external RenderDoc runtime.

Feature activation

Every feature is opt-in. Add its exact key to Data\F4SE\Plugins\FO4CommunityShaders\FO4CommunityShaders.User.toml:

[features.ScreenSpaceShadows]
load = true

Activation is evaluated once during startup, so restart the game after changing it. The shipped FO4CommunityShaders.toml holds documented defaults and is never modified by the plugin; user and in-game changes are written atomically to FO4CommunityShaders.User.toml. The in-game menu can update a feature's requested load state for the next launch and shows its runtime state, but it does not hot-load or unload features.

A feature loads only when its [features.<Name>].load value is true. A malformed Default file disables all features; a malformed User file is ignored. Presets configure only features that are already activated - they cannot activate any feature.

Baseline shader ownership is separately opt-in and does not load a feature. Set enabled = true under [shader_ownership] in the User TOML to replace the deferred targets with their stock-equivalent HLSL; the per-target switches in the shipped Default remain available for bring-up opt-outs. Restart after changing ownership.


Controls

Key Action
End Open or close the settings menu
F10 Toggle the Performance Overlay when it is enabled
F11 Capture one frame when RenderDoc is enabled
Shift + F11 Capture multiple frames when RenderDoc is enabled

Feature hotkeys are configurable in the unified TOML: toggle_hotkey for the overlay, capture_hotkey and multi_capture_hotkey for RenderDoc. Set a key to "none" to unbind it. Feature configuration lives directly under Data\F4SE\Plugins\FO4CommunityShaders\; supporting assets (fonts, presets) live in subdirectories beneath it.


Building from source

Prerequisites: Visual Studio 2026 (Desktop C++), CMake ≥ 3.21, vcpkg with VCPKG_ROOT set, and Git.

# Clone with submodules (CommonLibF4, FidelityFX, Streamline, XeSS)
git clone --recursive https://github.com/northaxosky/fallout4-community-shaders
cd fallout4-community-shaders

# Fetch the proprietary SDK runtime DLLs (not vendored in the repo)
pwsh scripts/fetch-sdks.ps1

# Configure + build (Release)
cmake -S . --preset=default
cmake --build build --config Release        # -> build/Release/FO4CommunityShaders.dll

Built on CommonLibF4. C++23, /W4 /WX (warnings are errors). Run the tests with ctest --test-dir build -C Release.


Compatibility notes

  • Frame generation requires a D3D12 feature-level 12.0 device and the runtime files for the selected backend; backend availability depends on the device and SDK. Changing the FG backend or multiplier requires a restart. RenderDoc also initializes at startup.
  • ENB handling is feature-specific: Screen Space Shadows, Screen Space GI, and Wetness Effects deactivate under ENB, Upscaling is limited to Native AA, DLSS-G is not used under ENB, and frame generation may fall back to FSR3-FG when that runtime is available.
  • RenderDoc requires an external renderdoc.dll exposing API 1.7.0 and is incompatible with DLSS-G for that session.
  • A successful build or launch does not prove a rendering path is visually correct - in-game validation is still required.

License

Licensed under GPL-3.0-or-later with the project Modding and Linking Exceptions. See LICENSE for the full text.

About

Attempt at Community Shaders for Fallout 4

Resources

Contributing

Stars

17 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages