mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
Remap SNORM/SRGB textures to RGBA16F
* Since we restrict output formats on remap to basic float/uint/sint, for 1-byte formats this ends up mapping to UNORM. Instead promote straight to RGBA16F to ensure we have the precision
This commit is contained in:
@@ -2293,11 +2293,23 @@ void ReplayProxy::RemapProxyTextureIfNeeded(TextureDescription &tex, GetTextureD
|
||||
else
|
||||
{
|
||||
if(tex.format.compByteWidth == 1)
|
||||
{
|
||||
params.remap = RemapTexture::RGBA8;
|
||||
|
||||
if(tex.format.compType == CompType::SNorm || tex.format.compType == CompType::UNormSRGB)
|
||||
{
|
||||
params.remap = RemapTexture::RGBA16;
|
||||
tex.format.compType = CompType::Float;
|
||||
}
|
||||
}
|
||||
else if(tex.format.compByteWidth == 2)
|
||||
{
|
||||
params.remap = RemapTexture::RGBA16;
|
||||
}
|
||||
else
|
||||
{
|
||||
params.remap = RemapTexture::RGBA32;
|
||||
}
|
||||
|
||||
// always remap depth to RGBA32F, because D16_UNORM will lose precision if remapped to R16_FLOAT
|
||||
if(tex.format.compType == CompType::Depth)
|
||||
|
||||
Reference in New Issue
Block a user