Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f263c84
build: fix zipping aio (#1579)
jiayev Oct 21, 2025
f8b7754
fix(grass collision): clamp maximum depth of grass (#1578)
doodlum Oct 21, 2025
8f51609
feat(UI): enhance shader blocking (#1564)
Copilot Oct 25, 2025
b47ad5d
fix: remove duplicate buffer setup (#1586)
soda3000 Oct 29, 2025
be9b960
feat: update shader compile elapsed time every second (#1587)
soda3000 Nov 1, 2025
b7a71e5
build: add cmake install commands (#1372)
ArcEarth Nov 4, 2025
0dee391
feat(perf-overlay): add size controls (#1591)
davo0411 Nov 4, 2025
dc0f75b
fix(perf-overlay): fix infinite draw calls table height (#1590)
davo0411 Nov 4, 2025
3f14125
refactor(perf-overlay): remove collapsible headers (#1572)
davo0411 Nov 5, 2025
268de33
fix(perf-overlay): removed ImGuiTableFlags_ScrollX/Y for scroll bar i…
kuplion Nov 6, 2025
7a53214
build: fix shader copying to relative paths (#1603)
alandtse Nov 16, 2025
94c04c6
fix(ibl): apply ibl to cubemap normalisation for non deferred (#1604)
jiayev Nov 16, 2025
ab9a64b
fix(grass): use correct light direction (#1602)
jiayev Nov 16, 2025
b19be49
fix(welcome-popup): adjust font size & window spacing (#1592)
davo0411 Nov 16, 2025
967b8ad
feat(lod): add gamma sliders (#1588)
jiayev Nov 16, 2025
c301939
build: correct CodeRabbit schema syntax (#1608)
Copilot Nov 16, 2025
cb52e92
build: add compile-time validation of GPU buffers (#1427)
Copilot Nov 16, 2025
0015163
ci: run shader validation on CMake and CI config changes (#1606)
Copilot Nov 17, 2025
b102274
build(deps): remove orphaned Intel XeSS dependency (#1611)
alandtse Nov 19, 2025
7cec036
fix(ui): enter key now behaves properly when first time popup is open…
soda3000 Nov 28, 2025
4612c18
feat(ui): add tabs to advanced settings & PBR search (#1599)
davo0411 Nov 28, 2025
39aa9d7
build: add HLSL intellisense (#1614)
Gistix Dec 1, 2025
520945a
refactor(UI): move light limit visualization into debug (#1619)
brucenguyen Dec 3, 2025
db72d81
refactor(ui): add settings for shader block hotkeys (#1624)
midona-rhel Dec 4, 2025
d7675dd
fix(ui): anchor reset settings button position (#1621)
midona-rhel Dec 6, 2025
f9ca01f
fix(hair): use indirect normal for deferred marschner hair (#1626)
jiayev Dec 7, 2025
5dbef94
build: fix Package-AIO-Manual for fresh pulls (#1625)
midona-rhel Dec 7, 2025
80ece1a
fix(snow): use world space vectors (#1618)
midona-rhel Dec 7, 2025
5dce430
feat(UI): add gaussian blur shader core files (#1595)
davo0411 Dec 10, 2025
1482e28
feat(ui): add test conditions button (#1637)
davo0411 Dec 13, 2025
b6b531c
fix(ui): blocked shader info overflow in Shader Debug tab (#1632)
Copilot Dec 13, 2025
11d4be3
fix(upscaling): replace NIS with RCAS for DLSS (#1620)
midona-rhel Dec 13, 2025
d221945
fix(dynamic cubemaps): add a check for timeskip (#1639)
midona-rhel Dec 13, 2025
93e0690
refactor: restructure lighting (#1633)
jiayev Dec 13, 2025
ecf23ed
feat(ui): add themes & fonts (#1596)
davo0411 Dec 13, 2025
b3cb42e
feat(water): add flowmap parallax (#1636)
davo0411 Dec 13, 2025
c067b35
build: fix race condition for pdb generation (#1642)
alandtse Dec 15, 2025
e4f1632
chore(hair): update feature version (#1643)
jiayev Dec 15, 2025
f8451d0
build: configure precommit to use conventional commits (#1641)
Copilot Dec 16, 2025
a359166
fix(eyes): disable vanilla eye normal (#1646)
jiayev Dec 17, 2025
8b8b375
test: add hlsl unit tests (#1653)
alandtse Dec 30, 2025
1bb4d08
ci: add automated wiki buffer documentation workflow (#1659)
alandtse Dec 30, 2025
5ed6701
fix(wetness): fix missing wetness (#1662)
doodlum Dec 31, 2025
bb5615e
fix(ISL): fix color luminance not affecting light (#1674)
SkrubbySkrubInAShrub Jan 4, 2026
a28a512
fix(tests): change success hint to compile correctly (#1681)
jiayev Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 91 additions & 11 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,38 @@ powershell.exe -Command "./BuildRelease.bat [PRESET_NAME]"

**Available Presets** (from CMakePresets.json):

- `ALL` (default) - Builds for SE/AE/VR in single binary
- `SE` - Skyrim Special Edition only
- `AE` - Anniversary Edition only
- `VR` - Skyrim VR only
- `ALL-TRACY` - Includes Tracy profiler support
- `ALL-WITH-AUTO-DEPLOYMENT` - Auto-deploys to configured Skyrim directories when template used.
- `ALL` (default) - Builds universal binary supporting SE/AE/VR runtime detection
- `SE` - Skyrim Special Edition only (compile-time targeting)
- `AE` - Anniversary Edition only (compile-time targeting)
- `VR` - Skyrim VR only (compile-time targeting)
- `PRE-AE` - SE + VR (excludes AE)
- `FLATRIM` - SE + AE (excludes VR)
- `ALL-TRACY` - Universal binary with Tracy profiler support enabled

**User Preset Template**:

- `ALL-WITH-AUTO-DEPLOYMENT` - Extends `ALL` with `AUTO_PLUGIN_DEPLOYMENT=ON` (copy template to use)

### Development Setup

1. Copy `CMakeUserPresets.json.template` → `CMakeUserPresets.json`
2. Configure `CommunityShadersOutputDir` for auto-deployment to Skyrim installations
3. Set build options in user preset:
- `AUTO_PLUGIN_DEPLOYMENT`: Auto-copy to Skyrim dirs
- `AIO_ZIP_TO_DIST`: Creates all-in-one distribution package
- `ZIP_TO_DIST`: Creates individual feature packages
- `TRACY_SUPPORT`: Enables performance profiling
3. Set build options in user preset or CMake cache:

**Build Options** (CMake cache variables):

- `AUTO_PLUGIN_DEPLOYMENT` (default: OFF) - Auto-copy build output to `CommunityShadersOutputDir`
- `ZIP_TO_DIST` (default: ON) - Creates individual feature packages as 7z files in `/dist`
- `AIO_ZIP_TO_DIST` (default: ON) - Creates all-in-one distribution package as 7z in `/dist`
- `TRACY_SUPPORT` (default: OFF) - Enables Tracy profiler integration for performance analysis

**Auto-Deployment Configuration**:

Set `CommunityShadersOutputDir` environment variable to semicolon-separated Skyrim Data directories:

```
CommunityShadersOutputDir=F:/MySkyrimModpack/mods/CommunityShaders;F:/SteamLibrary/steamapps/common/SkyrimVR/Data;F:/SteamLibrary/steamapps/common/Skyrim Special Edition/Data
```

### Shader Development and Testing

Expand Down Expand Up @@ -73,8 +89,72 @@ hlslkit-generate-defines --log CommunityShaders.log
hlslkit-buffer-scan --features-dir features/
```

### Custom CMake Targets

**Package and Deployment Targets**:

```bash
# Prepare AIO package structure (automatic with AIO_ZIP_TO_DIST or AUTO_PLUGIN_DEPLOYMENT)
cmake --build ./build/ALL --target PREPARE_AIO

# Prepare shaders only (useful for CI shader validation)
cmake --build ./build/ALL --target prepare_shaders

# Copy shaders to deployment directories (when AUTO_PLUGIN_DEPLOYMENT=ON)
cmake --build ./build/ALL --target COPY_SHADERS

# Create AIO zip package (when AIO_ZIP_TO_DIST=ON)
cmake --build ./build/ALL --target AIO_ZIP_PACKAGE
```

**Development Targets**:

```bash
# Format all C++ and HLSL code (requires clang-format)
cmake --build ./build/ALL --target FORMAT_CODE

# Generate shader validation configs from game logs (requires PowerShell)
cmake --build ./build/ALL --target generate_shader_configs
```

## Architecture Overview

### Manual packaging targets (detailed)

The project also provides a set of manual packaging targets that create distributable 7z packages or install the project into the AIO folder. These targets are useful when you want precise control over packaging (CI artifacts, local QA, or manual deployment).

Quick commands:

```bash
# Create the Core package (includes CORE features + plugin DLL)
cmake --build ./build/ALL --target Package-Core

# Create a manual AIO package (.7z) via install + tar
cmake --build ./build/ALL --target Package-AIO-Manual

# Create an individual feature package (name is sanitized from the feature folder)
cmake --build ./build/ALL --target Package-<Feature>

# Install into the AIO folder (installs to build/<preset>/aio)
cmake --build ./build/ALL --target AIO

# Alternatively use cmake --install to install to a custom prefix
cmake --install ./build/ALL --prefix <TARGET_DIR> # installs files according to CMake install() rules
```

Notes and behaviour:

- `Package-Core` collects everything marked as CORE and the built plugin into a temporary folder, then tars it to `dist/${PROJECT_NAME}-${UTC_NOW}.7z`.
- `Package-<Feature>` targets are generated per feature directory (non-CORE features). They create `${FEATURE}-${UTC_NOW}.7z` in `dist/`.
- `Package-AIO-Manual` performs an install to the AIO folder and then creates a single AIO archive. This is similar to the automated `AIO_ZIP_PACKAGE`, but wired as an explicit file-producing custom target (useful for CI reproducibility).
- `AIO` target runs `cmake --install` with the `aio` prefix so you can locally inspect the AIO folder layout without creating an archive.
- The install-based packaging uses the CMake `install()` rules defined near the top of `CMakeLists.txt` (the project installs `SKSE/Plugins`, copies `package/` and feature folders, and removes the Core placeholder). This makes manual installs and CI artifacts consistent with the runtime AIO layout.

Where to look in `CMakeLists.txt`:

- Manual packaging targets are defined in the "Manual packaging targets (Package-XXX)" section and create files under `${CMAKE_SOURCE_DIR}/dist`.
- The `install()` rules near the top of the file show what gets placed into the AIO layout when running `cmake --install`.

### Plugin Architecture

**Core Pattern**: Feature-driven modular system where each graphics enhancement is an independent `Feature` class that can be enabled/disabled at runtime.
Expand Down
39 changes: 20 additions & 19 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# CodeRabbit AI Configuration

instructions: |
When reviewing PRs, please provide suggestions for:

1. **Conventional Commit Titles** (if not following https://www.conventionalcommits.org/ or
if the existing title does not describe the code changes):
Format: type(scope): description
Length: 50 characters limit for title, 72 for body
Style: lowercase description, no ending period
Examples:
- feat(vr): add cross-eye sampling
- fix(water): resolve flowmap bug
- docs: update shader documentation
reviews:
path_instructions:
- path: "**/*"
instructions: |
When reviewing PRs, please provide suggestions for:

2. **Issue References** (if PR fixes bugs or implements features):
Suggest adding appropriate GitHub keywords:
- "Fixes #123" or "Closes #123" for bug fixes
- "Implements #123" or "Addresses #123" for features
- "Related to #123" for partial implementations
1. **Conventional Commit Titles** (if not following https://www.conventionalcommits.org/ or
if the existing title does not describe the code changes):
Format: type(scope): description
Length: 50 characters limit for title, 72 for body
Style: lowercase description, no ending period
Examples:
- feat(vr): add cross-eye sampling
- fix(water): resolve flowmap bug
- docs: update shader documentation

Otherwise, use your standard review approach focusing on code quality.
2. **Issue References** (if PR fixes bugs or implements features):
Suggest adding appropriate GitHub keywords:
- "Fixes #123" or "Closes #123" for bug fixes
- "Implements #123" or "Addresses #123" for features
- "Related to #123" for partial implementations

reviews:
Otherwise, use your standard review approach focusing on code quality.
path_filters:
- "**/*.hlsl"
33 changes: 33 additions & 0 deletions .github/actions/check-hlsl-changes/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Check for HLSL Changes"
description: "Determines if HLSL-related jobs should be skipped based on event type and file changes"
inputs:
hlsl-should-build:
description: "Output from check-changes job indicating if HLSL files changed"
required: false
default: "true"
outputs:
skip:
description: "True if the subsequent steps should be skipped"
value: ${{ steps.check.outputs.skip }}
runs:
using: "composite"
steps:
- name: Check if HLSL jobs should run
id: check
shell: bash
run: |
# For non-PR events (like push, workflow_dispatch, release), always run.
if [ "${{ github.event_name }}" != "pull_request_target" ]; then
echo "Non-PR event, proceeding with job."
echo "skip=false" >> $GITHUB_OUTPUT
exit 0
fi

# For PR events, check if any relevant files have changed.
if [ "${{ inputs.hlsl-should-build }}" != "true" ]; then
echo "No HLSL-related changes detected, skipping job."
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "HLSL-related changes detected, proceeding with job."
echo "skip=false" >> $GITHUB_OUTPUT
fi
21 changes: 21 additions & 0 deletions .github/actions/prepare-shaders/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Prepare Shaders"
description: "Prepare shaders for validation or analysis (requires setup-build-environment to be called first)"

runs:
using: "composite"
steps:
- name: Prepare shaders
uses: lukka/run-cmake@v10
with:
configurePreset: ALL
buildPreset: ALL
buildPresetAdditionalArgs: "['--target prepare_shaders']"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install hlslkit
run: pip install git+https://github.com/alandtse/hlslkit.git
shell: bash
84 changes: 84 additions & 0 deletions .github/actions/setup-build-environment/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: "Setup Build Environment"
description: "Sets up MSVC, vcpkg, and caching for build jobs. Requires code to be checked out first."
inputs:
cache-key-suffix:
description: "A suffix to make the cache key unique (e.g., validation, tests)"
required: true
outputs:
msvc-version:
description: "The detected MSVC compiler version"
value: ${{ steps.msvc_version.outputs.version }}
runs:
using: "composite"
steps:
- name: Enable Git Long Paths
run: git config --system core.longpaths true
shell: bash

- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Get MSVC version
id: msvc_version
shell: pwsh
run: |
"int main() { return 0; }" | Out-File -FilePath "dummy.cpp" -Encoding ASCII
$output = & cl.exe /Bv dummy.cpp 2>&1
$version = $null
$lines = $output -split "`n|`r"
foreach ($line in $lines) {
if ($line -match 'Version ([0-9]+\.[0-9]+\.[0-9]+)') {
$version = $Matches[1]
break
}
elseif ($line -match '([0-9]+\.[0-9]+\.[0-9]+)') {
$version = $Matches[1]
break
}
}
if (-not $version) {
if ($output -match 'Version ([0-9]+\.[0-9]+\.[0-9]+)') {
$version = $Matches[1]
}
elseif ($output -match '([0-9]+\.[0-9]+\.[0-9]+)') {
$version = $Matches[1]
}
}
if ($version) {
Add-Content -Path $env:GITHUB_OUTPUT -Value "version=$version" -Encoding UTF8
} else {
throw "MSVC version not found"
}
Remove-Item "dummy.cpp" -ErrorAction SilentlyContinue

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.5
with:
vcpkgJsonGlob: vcpkg.json

- name: Cache CMake build output
uses: actions/cache@v4
with:
path: build/ALL
key: ${{ runner.os }}-cmake-msvc-${{ steps.msvc_version.outputs.version }}-${{ inputs.cache-key-suffix }}-${{ github.event.inputs.cache-key-suffix || 'default' }}-${{ hashFiles('.gitmodules', 'extern/**', 'CMakePresets.json', 'vcpkg.json', 'vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-cmake-msvc-${{ steps.msvc_version.outputs.version }}-${{ inputs.cache-key-suffix }}-${{ github.event.inputs.cache-key-suffix || 'default' }}-
${{ runner.os }}-cmake-msvc-${{ steps.msvc_version.outputs.version }}-${{ inputs.cache-key-suffix }}-

- name: Remove stale CMake cache if drive letter changed
shell: pwsh
run: |
$cacheFile = "build/ALL/CMakeCache.txt"
if (Test-Path $cacheFile) {
$expected = (Resolve-Path .).Path.Substring(0,1)
$content = Get-Content $cacheFile -Raw
if ($content -match 'CMAKE_HOME_DIRECTORY:INTERNAL=([A-Z]):') {
$actual = $Matches[1]
if ($actual -ne $expected) {
Write-Host "❌ Cache drive mismatch. Removing stale build/ALL directory."
Remove-Item -Recurse -Force "build/ALL"
}
}
}
Loading