Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10279 from Pokechu22/intensity-alpha
TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha
  • Loading branch information
JosJuice committed Dec 22, 2021
2 parents b1f79d9 + 254f39c commit e6f40fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Data/Sys/GameSettings/RPBE01.ini
@@ -0,0 +1,10 @@
# RPBE01 - Pokemon Battle Revolution

[OnFrame]
# Fixes black pixels on the bottom/right of the screen, and black in
# some move effects that apply distortion to the screen
# This fixes a bug in the base game, not an emulation issue
# See https://gist.github.com/Pokechu22/e9fa9037fe21312ff32475638b78ba27
$Fix black screen effects
0x80244A94:dword:0x39080000
0x80244A9C:dword:0x38030000
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/BPMemory.h
Expand Up @@ -2059,7 +2059,7 @@ struct fmt::formatter<UPE_Copy>
"Converting from RGB to YUV: {}\n"
"Target pixel format: {}\n"
"Gamma correction: {}\n"
"Mipmap filter: {}\n"
"Half scale: {}\n"
"Vertical scaling: {}\n"
"Clear: {}\n"
"Frame to field: {}\n"
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/VideoCommon/TextureConverterShaderGen.cpp
Expand Up @@ -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 =
Expand Down

0 comments on commit e6f40fa

Please sign in to comment.