Skip to content

Commit

Permalink
FullscreenUI: Change default background and add Strobe
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 17, 2025
1 parent 7deaaa8 commit fbb63a8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/resources/fullscreenui/backgrounds/Default.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ void main()
// Radial gradient at (0.6, 0.4), moving horizontally slowly
float r1 = length(v_tex0 - vec2(0.6, 0.4));
float r2 = length(v_tex0 - vec2(0.61, 0.41));
float r = mix(r1, r2, sin(u_time / 10.0));
vec3 bg_color = vec3(r * 0.33);
float r = mix(r1, r2, sin(u_time / 5.0));
vec3 bg_color = vec3(0.1, 0.1, 0.6) * (1.0f - r);
o_col0 = vec4(bg_color, 1.0);
}
10 changes: 10 additions & 0 deletions data/resources/fullscreenui/backgrounds/Strobe.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
void main()
{
vec2 uv = v_tex0 * 2.0 - 1.0;
uv.x *= u_display_size.x / u_display_size.y;

vec2 center = vec2(cos(u_time * 0.2) * 1.5, (sin(u_time * 0.2) * 0.2) * 0.5 + 1.2);
float dist = length(uv - center);
float gradient = smoothstep(0.0, 1.0, dist);
o_col0 = vec4(mix(vec3(0.5, 0.5, 0.9), vec3(0.05, 0.05, 0.2), gradient), 1.0);
}
2 changes: 1 addition & 1 deletion src/core/fullscreen_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static void GetStandardSelectionFooterText(SmallStringBase& dest, bool back_inst
// Backgrounds
//////////////////////////////////////////////////////////////////////////

static constexpr const char* DEFAULT_BACKGROUND_NAME = "Trails";
static constexpr const char* DEFAULT_BACKGROUND_NAME = "Default";

static bool HasBackground();
static void LoadBackground();
Expand Down

0 comments on commit fbb63a8

Please sign in to comment.