doodlum/skyrim-community-shaders

GitHub: doodlum/skyrim-community-shaders

一款社区驱动的《上古卷轴5》SKSE 核心插件,提供模块化的高级图形着色器开发框架,支持 AE、SE 和 VR 版本。

Stars: 944 | Forks: 116

[![最新版本](https://img.shields.io/github/v/release/doodlum/skyrim-community-shaders)](https://github.com/doodlum/skyrim-community-shaders/releases) [![许可证](https://img.shields.io/github/license/doodlum/skyrim-community-shaders)](./LICENSE) [![最后提交](https://img.shields.io/github/last-commit/doodlum/skyrim-community-shaders)](https://github.com/doodlum/skyrim-community-shaders/commits) [![构建状态](https://img.shields.io/github/actions/workflow/status/doodlum/skyrim-community-shaders/build.yaml?branch=dev)](https://github.com/doodlum/skyrim-community-shaders/actions) [![Discord](https://img.shields.io/discord/1080142797870485606?label=discord&logo=discord&color=5865F2)](https://discord.com/invite/nkrQybAsyy) [![未解决问题](https://img.shields.io/github/issues/doodlum/skyrim-community-shaders)](https://github.com/doodlum/skyrim-community-shaders/issues) [![贡献者](https://img.shields.io/github/contributors/doodlum/skyrim-community-shaders)](https://github.com/doodlum/skyrim-community-shaders/graphs/contributors) [![Stars](https://img.shields.io/github/stars/doodlum/skyrim-community-shaders?style=social)](https://github.com/doodlum/skyrim-community-shaders/stargazers) [![Pre-commit CI](https://results.pre-commit.ci/badge/github/doodlum/skyrim-community-shaders/dev.svg)](https://results.pre-commit.ci/latest/github/doodlum/skyrim-community-shaders/dev) ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/doodlum/skyrim-community-shaders?utm_source=oss&utm_medium=github&utm_campaign=doodlum%2Fskyrim-community-shaders&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/doodlum/skyrim-community-shaders) # Skyrim Community Shaders 用于社区驱动的高级图形修改的 SKSE 核心插件。 [Nexus](https://www.nexusmods.com/skyrimspecialedition/mods/86492) [用户 Wiki](https://modding.wiki/en/skyrim/developers/community-shaders) ## 环境要求 - 你选择的任何终端(例如 PowerShell) - [Visual Studio Community 2026](https://visualstudio.microsoft.com/) - 使用 C++ 的桌面开发 - CMake Tools for Windows - HLSL Tools - [Git](https://git-scm.com/downloads) - 编辑 `PATH` 环境变量,并将 Git.exe 的安装路径添加为新值 ## 可选环境要求 ``` CMake & Vcpkg comes with Visual Studio in Developer Command Prompts already. Install them manually only if you want them in everywhere. ``` - [CMake](https://cmake.org/) - 如果你已经安装了 Visual Studio CMake Tools,则无需手动安装 - 现在需要 CMake 4.2+ 版本 - 编辑 `PATH` 环境变量,并将 cmake.exe 的安装路径添加为新值 - 有关查找和编辑 `PATH` 环境变量的说明可以在[这里](https://www.java.com/en/download/help/path.html)找到 - [Vcpkg](https://github.com/microsoft/vcpkg) - 按照 vcpkg [快速入门指南](https://github.com/microsoft/vcpkg#quick-start-windows)中的说明安装 vcpkg - 安装后,添加一个名为 `VCPKG_ROOT` 的新环境变量,其值为包含 vcpkg 的文件夹路径 - 确保你的本地 vcpkg 仓库与 `vcpkg.json` 中 `builtin-baseline` 指定的 commit id 匹配,否则你可能会获得非固定 vcpkg 依赖项的另一个版本,从而导致未定义的行为 ## 用户环境要求 - [Address Library for SKSE](https://www.nexusmods.com/skyrimspecialedition/mods/32444) - SSE/AE 必需 - [VR Address Library for SKSEVR](https://www.nexusmods.com/skyrimspecialedition/mods/58101) - VR 必需 ## 构建说明 ### 克隆包含子模块的仓库 要克隆包含所有子模块的仓库,请在终端中运行以下命令: ``` git clone https://github.com/doodlum/skyrim-community-shaders.git --recursive cd skyrim-community-shaders ``` ### Visual Studio 构建 要构建项目,只需使用 Visual Studio 的“打开文件夹”功能打开 `./skyrim-community-shaders`。(确保在安装 VS 时选中了 `CMake Tools for Windows`) 按照提示对项目进行 `Configure`(配置)和 `Build`(构建)。 默认情况下,它应该在 `./build/ALL/aio` 文件夹中生成 AIO 包。 #### Zip 包 & 可选目标 如果你将 `Solution Explorer`(解决方案资源管理器)更改为 `CMake Targets View`(CMake 目标视图),你可以找到为每个功能创建 zip 包的可选目标。 右键单击目标并选择 `Build` 以在 `./dist/` 中创建 zip 包。 ### 在命令行中使用 CMake 进行高级构建 打开“Developer PowerShell for VS 2026”或“x64 Native Tools Command Prompt”(这些会为你设置 Visual Studio 工具链)。 然后从仓库根目录运行: ``` # 生成 build 文件(使用 ALL preset) cmake --preset ALL # 使用 preset 进行 Build cmake --build --preset ALL # 在某处安装 AIO package,例如 $MOD_FOLDER cmake --install --preset ALL -- --prefix $MOD_FOLDER ``` # 注意事项 - 如果你更喜欢手动运行 VC 环境,请启动 Developer PowerShell 或 x64 Native Tools 提示符,而不是直接从 PowerShell 调用 vcvarsall.bat。 - 便捷包装脚本 `BuildRelease.bat` 也包含这些步骤。 #### 构建 zip 包 你可以为可选的 cmake 目标构建 zip 包。 目前支持 `AIO_ZIP_PACKAGE`、`Package-AIO-Manual`、`Package-Core` 和 `Package-`: ``` # 在 ./dist/ 中创建 AIO package # 自动 AIO zip(需要 AIO_ZIP_TO_DIST=ON) cmake --build ./build/ALL --config Release --target AIO_ZIP_PACKAGE # 手动 AIO package(install + tar) cmake --build ./build/ALL --config Release --target Package-AIO-Manual # 在 ./dist/ 中创建 CommunityShaders core package cmake --build ./build/ALL --config Release --target Package-Core # 在 ./dist/ 中创建 feature package(示例:GrassLighting) cmake --build ./build/ALL --config Release --target Package-GrassLighting ``` 有关打包目标、选项以及自动打包和手动打包之间区别的更多详细信息,请参阅 `.claude/CLAUDE.md` 中的“Manual packaging targets (detailed)”部分。 #### CMAKE 选项(可选) 如果你想要一个示例 CMakeUserPreset 作为起点,你可以复制 `CMakeUserPresets.json.template` -> `CMakeUserPresets.json` #### AUTO_PLUGIN_DEPLOYMENT - 此选项默认为 `"OFF"` - 确保在 `CMakeUserPresets.json` 中将 `"AUTO_PLUGIN_DEPLOYMENT"` 设置为 `"ON"` - 更改 `"CommunityShadersOutputDir"` 值以匹配你所需的输出,如果你需要多个文件夹,可以用 `;` 分隔它们,如模板示例中所示 #### TRACY_SUPPORT - 此选项默认为 `"OFF"` - 这将启用 tracy 支持,更改此选项时可能需要删除 build 文件夹 使用自定义预设时,你可以使用参数调用 BuildRelease.bat 来指定要配置的预设,例如: `.\BuildRelease.bat ALL-WITH-AUTO-DEPLOYMENT` 在不同预设之间切换时,你可能需要移除 build 文件夹 ### 使用 Docker 构建 对于那些不喜欢在机器上安装 Visual Studio 或其他构建依赖项的用户,这将其封装起来。这使用 Windows Containers,因此目前不支持 WSL。 1. 如果尚未安装,请先安装 [Docker](https://www.docker.com/products/docker-desktop/)。 2. 在你选择的 shell 中运行以下命令以切换到 Windows 容器并创建构建容器: ``` & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchWindowsEngine; ` docker build -t skyrim-community-shaders . ``` 3. 然后运行构建: ``` docker run -it --rm -v .:C:/skyrim-community-shaders skyrim-community-shaders:latest ``` 4. 从 `build/aio` 文件夹中检索生成的构建文件。 5. 在后续构建中,只需运行构建步骤(3.) #### 使用 Docker 构建的故障排除 如果你在步骤 3 期间遇到 `Access violation` 构建错误,可以尝试添加 [`--isolation=process`](https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container): ``` docker run -it --rm --isolation=process -v .:C:/skyrim-community-shaders skyrim-community-shaders:latest ``` ## 调试 ### 从命令行启动 MO2-SKSE-Skyrim 1. 打开 Steam 2. 关闭 ModOrganizer GUI 3. 将 `ModOrganizer.exe`(MO2 文件夹)添加到你的 PATH,或使用其路径 4. 运行命令: ``` # 更改 Working Directory cd "C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition" # 使用 MO2 启动 SKSE ModOrganizer.exe --log run "C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\skse64_loader.exe" ``` ### 使用 RenderDoc 捕获 在 Launch Application Menu(启动应用程序菜单)中,使用以下设置: - Executable Path: `PATH/TO/ModOrganizer.exe` - Working Directory: `C:/Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition` - Command-line Arguments: `--log run "C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\skse64_loader.exe"` - [x] **Capture Child Process** ## 许可证 ### 默认 [GPL-3.0-or-later](COPYING) WITH [Modding Exception AND GPL-3.0 Linking Exception (with Corresponding Source)](EXCEPTIONS.md)。 具体而言,Modded Code(模组代码)包括: - Skyrim(及其变体) - 用于通过专有 SDK 启用附加功能的硬件驱动程序,例如 [Nvidia DLSS](https://developer.nvidia.com/rtx/dlss/get-started) 和 [AMD FidelityFX FSR3](https://gpuopen.com/fidelityfx-super-resolution-3/) Modding Libraries(模组库)包括: - [SKSE](https://skse.silverlock.org/) - Commonlib(及其变体)。 ### Shaders 请参阅每个目录中的 LICENSE;如果没有,则为[默认](#default) - [Features Shaders](features) - [Package Shaders](package/Shaders/) ### 图标 - [Community Shaders Logo](package/Interface/CommunityShaders/Icons/Community%20Shaders%20Logo/) 不受 GPL-3.0 许可证涵盖。它仅提供用于个人使用(例如,从源代码构建),并且只能以未修改的形式使用。没有任何许可证允许用于任何其他目的或分发该徽标。未授予该徽标的商标许可证。未经 Community Shaders 团队明确书面同意,严禁任何未明确允许的使用。
标签:AE, Bash脚本, DirectX, HLSL, Modding, NexusMods, SE, Shaders, SKSE插件, Skyrim, VR, 上古卷轴5, 图形增强, 开源, 渲染, 游戏开发, 游戏模组, 画质优化, 着色器, 社区驱动, 网络安全研究, 视觉效果, 请求拦截