Skip to content

Conversation

@Uncomfy
Copy link

@Uncomfy Uncomfy commented Oct 22, 2024

Previously discussed here: #12983

Depends on:

Allows to change which colour the background is dimmed to. Currently only supports grayscale.

This is not a full implementation, as it doesn't support storyboards and videos.

The main reason I'm asking for comments so early is that this implementation handles dimming in two different classes, which leads to code duplication, so I wonder if there is a cleaner way to do this.

osu_bg_dim_colour.mp4

Here are also a few examples of how it could look with colour picker instead of a grayscale slider, using SettingsColour, but I'm unsure if it fits the design, as colour pickers weren't used in Settings/Visual Settings before. Also it doesn't work properly in Visual Settings yet, because it doesn't have a PopoverContainer in its hierarchy, and I'm not really sure how to handle it.

settings
settings_colour_picker_open
visual_settings_1

Uncomfy added 30 commits October 9, 2024 18:43
…avoid confusion with existing BeatmapBackground class
…ed BeatmapBackground to DimmableBeatmapBackground in BackgroundScreenBeatmap
...for changing the dim colour.
It is computed in a similar way to Drawable.DrawColourInfo
Need to double-check that there is always going to be something beneath them that will have the offset.
This stops the framebuffer from being redrawn when colour changes
...which only happens because ColouredDimmableSprite needs to invalidate
DrawNode together with the colour change.
…invalidation before removing Colour from invalidation
@Uncomfy
Copy link
Author

Uncomfy commented Jun 15, 2025

Storyboards are now also supported

storyboard.mp4

However, I used default method implementation in IColouredDimmable interface, unsure if that's ok to do

@Uncomfy
Copy link
Author

Uncomfy commented Jun 18, 2025

Current implementation makes performance on heavy storyboards (such as Mili - world.execute(me);) significantly worse. Mean frametimes for different parts of the map:

Gameplay Breaks Fade in Fade out
2025.607.0 3.51 ms 3.56 ms 3.43 ms 3.68 ms
80c93b3 4.32 ms 4.34 ms 4.22 ms 4.50 ms
Relative increase 23% 22% 23% 22%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants