summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-12-15 16:39:15 -0800
committerPokechu22 <Pokechu022@gmail.com>2021-12-20 11:34:05 -0800
commit2f6953efb62b487639bbc82be95466e07cb42cdb (patch)
treeb6a9333f9ae0d4432684ca2f6593463eecce684b /Source/Core/VideoCommon/TextureConverterShaderGen.cpp
parent820a424dcdf0095cf088abea921aaaac299dbccc (diff)
TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha
We were already doing this for non-intensity formats, but it seems like the same applies to intensity formats.
Diffstat (limited to 'Source/Core/VideoCommon/TextureConverterShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureConverterShaderGen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
index 42e077ba96..ea458717c8 100644
--- a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
+++ b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
@@ -216,6 +216,9 @@ ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data)
}
else if (uid_data->is_intensity)
{
+ if (!uid_data->efb_has_alpha)
+ out.Write(" texcol.a = 1.0;\n");
+
bool has_four_bits =
(uid_data->dst_format == EFBCopyFormat::R4 || uid_data->dst_format == EFBCopyFormat::RA4);
bool has_alpha =