mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Don't use BC1_UNORM_SRGB because it breaks YCoCg decoding
This commit is contained in:
parent
f9c9f9c65e
commit
4bdaca627f
2 changed files with 3 additions and 8 deletions
|
@ -277,16 +277,11 @@ void idImage::AllocImage()
|
|||
break;
|
||||
|
||||
case FMT_DXT1:
|
||||
format = nvrhi::Format::BC1_UNORM_SRGB;
|
||||
format = nvrhi::Format::BC1_UNORM;
|
||||
break;
|
||||
|
||||
case FMT_DXT5:
|
||||
// This is used for compressed normals
|
||||
format = nvrhi::Format::BC3_UNORM_SRGB;
|
||||
if( usage == TD_BUMP )
|
||||
{
|
||||
format = nvrhi::Format::BC3_UNORM;
|
||||
}
|
||||
format = nvrhi::Format::BC3_UNORM;
|
||||
break;
|
||||
|
||||
case FMT_DEPTH:
|
||||
|
|
|
@ -157,7 +157,7 @@ void main( PS_IN fragment, out PS_OUT result )
|
|||
half4 bumpMap = t_Normal.Sample( samp0, fragment.texcoord0.xy );
|
||||
half4 YCoCG = t_BaseColor.Sample( samp2, fragment.texcoord1.xy );
|
||||
half4 specMapSRGB = t_Specular.Sample( samp1, fragment.texcoord2.xy );
|
||||
half4 specMap = specMapSRGB;//sRGBAToLinearRGBA( specMapSRGB );
|
||||
half4 specMap = sRGBAToLinearRGBA( specMapSRGB );
|
||||
|
||||
half3 diffuseMap = sRGBToLinearRGB( ConvertYCoCgToRGB( YCoCG ) );
|
||||
|
||||
|
|
Loading…
Reference in a new issue