改进 DLSS NR 后处理兼容性与调节选项 - #207
Open
Raven-July wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new nvngx.dll proxy is missing a forwarded NVSDK_NGX_VULKAN_Init_with_ProjectID export and the post-process path needs an explicit GL memory barrier before blitting, plus zh_CN translations are incomplete for newly added options.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
本 PR 聚焦于改进 DLSS NR 在 Minecraft 26.2 Vulkan 渲染链路中的后处理集成:引入多 Pass 串联处理、HDR/SDR 安全的颜色工作流与更丰富的调节参数,并通过新增 nvngx.dll 代理库调整 DLSS NR 的 DLL 加载与 NGX 初始化策略。
Changes:
- 重构 DLSS NR 后处理链路:支持最多 4 次连续 Pass,并在尺寸/配置/启停变化时重置历史。
- 新增 HDR/SDR 颜色变换 compute shader(AgX Log 可逆域压缩/恢复 + 颜色/高光保护)。
- 新增 NGX 代理 DLL 与初始化流程调整(更丰富的 init 路径与日志),并补充配置项与部分翻译。
File summaries
| File | Description |
|---|---|
| native/cpp/SRNativeDLSSNR/src/dlssnr.cpp | 扩展 NGX 初始化/日志与额外参数(app data path、project id init 尝试等) |
| native/cpp/SRNativeDLSSNR/proxy/nvngx_proxy.cpp | 新增 nvngx.dll 代理库,转发 NGX 导出到 nvngx_dlssnr.dll |
| native/cpp/SRNativeDLSSNR/CMakeLists.txt | 构建新增的 nvngx 代理动态库目标 |
| common/src/main/resources/super_resolution.mixins.json | 注册 26.2 的 DLSS NR 注入 mixin |
| common/src/main/resources/shader/dlssnr_hdr_color.comp.glsl | 新增 HDR/SDR 颜色压缩/恢复与保护逻辑 compute shader |
| common/src/main/resources/assets/super_resolution/lang/zh_cn.json | 增加(部分)DLSS NR 新配置项中文文案 |
| common/src/main/resources/assets/super_resolution/lang/en_us.json | 增加 DLSS NR 新配置项英文文案 |
| common/src/main/java/io/homo/superresolution/core/NativeLibManager.java | 注册并提取新的 nvngx.dll 代理库 |
| common/src/main/java/io/homo/superresolution/common/upscale/interoplayer/GlVulkanInteropAlgorithm.java | 允许算法指定 interop color 纹理格式并传入资源初始化 |
| common/src/main/java/io/homo/superresolution/common/upscale/algo/dlss/DLSSNR.java | 固定 DLSS NR interop color 为 RGBA16F,并改用 nvngx.dll 路径/传入 app data path |
| common/src/main/java/io/homo/superresolution/common/presentation/DLSSNRPostProcessor.java | 多 Pass DLSS NR 后处理串联、HDR/SDR 颜色工作流与历史重置策略 |
| common/src/main/java/io/homo/superresolution/common/presentation/DLSSNRHdrColorTransform.java | 新增颜色域变换与保护逻辑的 OpenGL compute 调度封装 |
| common/src/main/java/io/homo/superresolution/common/mixin/presentation/v26_2/VulkanPresentationGameRendererDLSSNRMixin.java | 26.2 渲染流程中新增 DLSS NR 后处理注入点 |
| common/src/main/java/io/homo/superresolution/common/config/special/DLSSNRSpecialConfig.java | 新增/扩展 DLSS NR 配置项与滑条范围(0..2 / Pass 数等) |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| SuperResolutionConfig.SPECIAL.DLSSNR.HIGHLIGHT_PROTECTION.get(), | ||
| SuperResolutionConfig.SPECIAL.DLSSNR.HIGHLIGHT_PROTECTION_THRESHOLD.get() | ||
| ); | ||
| Gl.DSA.blitFramebuffer( |
Comment on lines
+111
to
+113
| } | ||
|
|
||
| __declspec(dllexport) NVSDK_NGX_Result NVSDK_CONV NVSDK_NGX_VULKAN_Shutdown1(VkDevice device) { |
Comment on lines
252
to
+256
| "superresolution.screen.config.special.dlssrr.renderpreset.tooltip": "选择 NVIDIA DLSS 光线重建的渲染预设(模型)", | ||
| "superresolution.screen.config.special.dlssnr.highlight_protection.name": "DLSS NR 高光保护强度", | ||
| "superresolution.screen.config.special.dlssnr.highlight_protection.tooltip": "在明亮区域逐渐恢复未经 DLSS NR 修改的原始颜色;0 关闭,1 完全保护高光", | ||
| "superresolution.screen.config.special.dlssnr.highlight_protection_threshold.name": "DLSS NR 高光保护阈值", | ||
| "superresolution.screen.config.special.dlssnr.highlight_protection_threshold.tooltip": "控制高光保护开始介入的原始亮度;数值越低,受保护的亮部范围越大", |
|
Amazing, so we will get NR in Minecraft Java hahaha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 改进了 DLSS NR 集成,主要包括 Minecraft 26.2 渲染流程适配、多 Pass 后处理、HDR 安全的颜色处理流程,以及更多 DLSS NR 调节选项。
主要改动
DLSSNRPostProcessor,支持最多 4 次连续 DLSS NR 处理。RGBA16F,提高 HDR / signed color 场景下的稳定性。nvngxproxy DLL,用于将必要的 NGX 导出转发到nvngx_dlssnr.dll。NVSDK_NGX_VULKAN_Init_with_ProjectID。NVSDK_NGX_VULKAN_Init_Ext2。nvngx.dll。NativeLibManager中注册新的 native proxy library。新增配置项
pass_count:连续执行的 DLSS NR Pass 数量,范围 1 到 4。color_strength:控制 DLSS NR 对原始色度的影响强度。highlight_protection:hdr模式下在高亮区域恢复原始颜色,减少亮部异常。highlight_protection_threshold:hdr模式下控制高光保护开始介入的亮度阈值。0.0到2.0。修复内容