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:
baldurk
2020-05-16 18:14:27 +01:00
parent e8237ebd10
commit 01873eddcc
+12
View File
@@ -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)