Skip to content

Commit

Permalink
Floor level should have a transparent background
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor251093 committed Feb 5, 2025
1 parent fc2d070 commit c27240e
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions src/plugins/PluginKingdomHeartsReCoded_GPU_OpenGL_shaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,68 @@ ivec4 getTopScreenColor(float xpos, float ypos, int index)
color = ivec4(color.r, blur, 16 - blur, 0x01);
}
}
if (IsBugSector)
{
// floor label
float bottomLabelWidth = 50.0;
float bottomLabelHeight = 15.0;
float increaseLabelSize = 1.8;
float labelWidth = (bottomLabelWidth/increaseLabelSize)*heightScale;
float labelHeight = (bottomLabelHeight/increaseLabelSize);
float labelRightMargin = 12.0;
float labelTopMargin = 90.0;
float labelLeftMargin = 256.0*iuTexScale - labelWidth - labelRightMargin;
if (texPosition3d.x >= labelLeftMargin &&
texPosition3d.x < (256.0*iuTexScale - labelRightMargin) &&
texPosition3d.y <= labelHeight + labelTopMargin &&
texPosition3d.y >= labelTopMargin) {
if (index == 0)
{
if (color.b != color.r) {
color = ivec4(0, 0, 0, 31);
}
}
if (index == 2)
{
ivec4 colorZero = ivec4(texelFetch(ScreenTex, textureBeginning, 0));
if (colorZero.b != colorZero.r) {
color = ivec4(color.r, 48, 16, 0x01);
}
}
}
// floor value
float bottomFloorWidth = 82.0;
float bottomFloorHeight = 15.0;
float increaseFloorSize = 1.8;
float floorWidth = (bottomFloorWidth/increaseFloorSize)*heightScale;
float floorHeight = (bottomFloorHeight/increaseFloorSize);
float floorRightMargin = 12.0;
float floorTopMargin = 98.0;
float floorLeftMargin = 256.0*iuTexScale - floorWidth - floorRightMargin;
float bottomFloorLeftMargin = 50.0;
if (texPosition3d.x >= floorLeftMargin &&
texPosition3d.x < (256.0*iuTexScale - floorRightMargin) &&
texPosition3d.y <= floorHeight + floorTopMargin &&
texPosition3d.y >= floorTopMargin) {
if (index == 0)
{
if (color.b != color.r) {
color = ivec4(0, 0, 0, 31);
}
}
if (index == 2)
{
ivec4 colorZero = ivec4(texelFetch(ScreenTex, textureBeginning, 0));
if (colorZero.b != colorZero.r) {
color = ivec4(color.r, 48, 16, 0x01);
}
}
}
}
}
}
Expand Down

0 comments on commit c27240e

Please sign in to comment.