Skip to content

Fix remaining Path aliasing issues by adding support for R32F framebuffer format#6776

Merged
smoogipoo merged 4 commits into
ppy:masterfrom
EVAST9919:path-aliasing-new
Jul 21, 2026
Merged

Fix remaining Path aliasing issues by adding support for R32F framebuffer format#6776
smoogipoo merged 4 commits into
ppy:masterfrom
EVAST9919:path-aliasing-new

Conversation

@EVAST9919

Copy link
Copy Markdown
Contributor

Issue

While #6767 is good enough for most cases, there are still cases where it fails. There underlying issue - Max blending used for solving path intersections isn't working correctly with our encoded sdf value. It selects max value per component while with our encoded value we would need it to select the color with the first max component.
Example:
pixel 1 - 0.5, 0.5, 0.5, 0.5
pixel2 - 0.5, 0.6, 0.1, 0.1
Current resulted color - 0.5, 0.6, 0.5, 0.5 (max per component, blends colors)
Desired color - 0.5, 0.6, 0.1, 0.1 (green value is bigger - full pixel2 color should be the result)

Solution

By adding support for R32F (32-bit single-channel) texture format Max will work as expected since there's only a single value to compare. We also can store 32-bit float SDF directly in the texture without encoding/decoding step with the same memory usage per texture.

master pr
master-path pr-path
master-aliasing pr-aliasing

Performance:
Tested with the most complex aspire slider I could find (tens of thousands of vertices) and it's basically the same

master pr
master-perf pr-perf

Tested on windows with all 3 renderers, mobile/mac probably needs testing as well.

@smoogipoo smoogipoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, lgtm!

The only concern I have is the ordering of the new texture format args, but I can understand why it was done this way and agree it makes sense. Regardless this won't require any changes osu!-side so that's good 👍

@smoogipoo
smoogipoo merged commit 0c3fb25 into ppy:master Jul 21, 2026
13 of 14 checks passed
@EVAST9919
EVAST9919 deleted the path-aliasing-new branch July 21, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants