graphics - How to render a UNORM formatted texture to an sRGB DirectX11 swapchain?
问题描述
I'm writing a DirectX 11 OpenXR app. OpenXR creates the DX11 swapchain with a format of DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
(the device doesn't support non sRGB formats).
The problem I have is that I need to render a video texture. And IMFMediaEngine::TransferVideoFrame()
won't work unless the texture is in a non sRGB format like DXGI_FORMAT_R8G8B8A8_UNORM
. So if I use the UNORM texture format for the video frame it works.
The problem is that in the headset the colors of the texture are off. They are too bright. I suspect converting them from sRGB->Linear inside the pixel shader would make them look like they are supposed to. But I'm not sure what is happening.
I'm a bit confused about how to handle this situation where the swapchain (sRGB) is created by OpenXR and it does the presenting but I have to sample from UNORM textures.
Can anyone provide guidance?
解决方案
推荐阅读
- javascript - 赛普拉斯:可以动态选择带有 eq() 的随机元素吗?
- windows-10 - 当我将参数传递给嵌套的 Start-Process 命令时,PowerShell 删除了多个连续的空格
- azure-machine-learning-service - 根据 test_data 从 AutoMLRun 中获取指标
- r - 为什么 x 轴不为现有值增加值?
- soap - NextJS 中 SOAP 请求的“错误:无法验证第一个证书”和“代码:‘UNABLE_TO_VERIFY_LEAF_SIGNATURE’”
- javascript - Material-UI TypeScript 问题使用 Link 作为组件创建样式化的 ListItemButton
- javascript - 在循环中断提示中设置查询器提示数组
- azure-devops - 仅在 Azure DevOps 中构建时出现 Biztalk 映射错误
- javascript - Skrollr 不允许在移动设备上滚动 Wordpress,解决此问题的最快方法是什么?
- json - 在雪花中展平可变长度 JSON