Skip to content

Commit

Permalink
Merge pull request #351 from frenzibyte/fix-intro-animation
Browse files Browse the repository at this point in the history
Fix logo animation not rendering correctly on iOS
  • Loading branch information
peppy authored Dec 24, 2024
2 parents 159356d + cd67c75 commit d05ee7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions osu.Game.Resources/Shaders/sh_LogoAnimation.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ void main(void)
// todo: workaround for a SPIR-V bug (https://github.com/ppy/osu-framework/issues/5719)
float one = g_BackbufferDraw ? 1 : 0;

vec4 colour = texture(sampler2D(m_Texture, m_Sampler), v_TexCoord, -0.9) * one;
vec4 texel = texture(sampler2D(m_Texture, m_Sampler), v_TexCoord, -0.9) * one;

o_Colour = colour.r < progress ? vec4(v_Colour.rgb, v_Colour.a * colour.a) : vec4(0);
// progress information is stored in the red channel,
// and alpha information is stored in the green channel.
float current = texel.r;
float alpha = texel.g;

o_Colour = current < progress ? vec4(v_Colour.rgb, v_Colour.a * alpha) : vec4(0);
}
Binary file modified osu.Game.Resources/Textures/Intro/Triangles/logo-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified osu.Game.Resources/Textures/Intro/Triangles/logo-highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d05ee7c

Please sign in to comment.