feat(hdr): HDR 初步适配 DLSS5 - #13
Open
konodiodaaaaa1 wants to merge 1 commit into
Open
Conversation
konodiodaaaaa1
force-pushed
the
hdr-initial-adaptation
branch
from
September 2, 2026 21:42
3eb2057 to
9fa5387
Compare
Owner
|
这个方案不会有明显色阶断层和压缩吗... |
Author
这一套是用codex探索出来的,我测试了一些视频下和浏览器里至少可以没有明显的过曝了,但更细致的对比个人不太专业看不大出来,总之是一个探索的初步可行方案 |
Owner
|
加一下群吧 917416708 我可能会做一个测试包帮我测试一下 我这里hdr有 但是支持不好 |
Author
|
我刚才测试了一下好像不用16转8,直接16转16这套管线好像也能正常出来 |
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.
这次适配解决什么问题
Windows 开启 HDR 后,
Graphics Capture默认路径不能保留 HDR 桌面的 FP16 scRGB 数据。直接把 HDR 捕获帧交给普通 SDR 效果会出现过曝,直接让当前 DLSSNR 运行库读写 FP16 又会出现黑屏或红色通道异常。这次提交增加一条 HDR 专用桥接路径:捕获阶段使用 FP16 scRGB,DLSS5/DLSSNR 阶段使用它已经验证过的 R8 SDR 颜色缓冲,最后恢复为 FP16 scRGB 交给 HDR 呈现器。Windows 系统 HDR 全程保持开启。
使用方法
导入仓库中的
presets/ScalingModes-HDR-DLSS5.json,然后在 Magpie 配置文件中同时设置下面两项:捕获方式必须选择
Graphics Capture (HDR)。普通Graphics Capture使用 B8G8R8A8 SDR 捕获,无法进入本次 HDR 适配路径。只导入缩放模式、没有切换 HDR 捕获时,效果链的输入格式与预期不一致。测试所用配置
本次提交测试时使用的完整效果顺序如下,顺序需要保持一致:
每个效果的格式和作用:
HDRToSDRR16G16B16A16_FLOAT->R8G8B8A8_UNORMFrameRate_FilterDLSSNR\\DLSSNR_AI_FilterSDRToHDRR8G8B8A8_UNORM->R16G16B16A16_FLOATDLSSNR 保持 R8 输入和输出合约。之前尝试让 DLSSNR 直接处理 FP16 scRGB 时,运行库返回成功状态,但实际画面出现红色通道失真,因此桥接路径刻意把格式转换放在 DLSSNR 前后。
SDR 白点参数
测试显示器的 Windows 参数为:
HDRToSDR.hlsl和SDRToHDR.hlsl当前使用sdrWhiteScale = 4.5。这个值对应本次测试显示器。更换显示器后,需要读取新的DISPLAYCONFIG_SDR_WHITE_LEVEL,并同步修改两个效果文件中的参数。实际测试环境
Graphics Capture (HDR)HDR DLSS5 BridgeFrameRate_Filter目标帧率 60 FPS测试结果:浏览器视频可以正常显示,画面没有黑屏和红色通道异常,DLSSNR 连续返回成功结果,视频和桌面 UI 的亮度接近原生 HDR 桌面。极亮 HDR 高光经过 R8 SDR 工作缓冲后会受到范围限制,原始 HDR 动态范围暂时不会完整保留。
日志验证
启动缩放后,可以在
logs\\magpie.log中检查:如果日志里没有 HDR 捕获模式,先检查配置文件中的捕获方式。如果效果文件缺失,请完整解压 Release 包,不要只复制
Magpie.exe。提交内容
HDRToSDR、SDRToHDR两个桥接效果presets/ScalingModes-HDR-DLSS5.jsondocs/experimental/HDR-DLSS5-Bridge.md这是 HDR 的初步适配,主要目标是让当前 DLSS5/DLSSNR 运行库在 Windows HDR 桌面上得到一条可用、可复现的处理路径。