Skip to content

Conversation

@mmozeiko
Copy link
Collaborator

This should increase performance of a blur shader.
Alpha blending was really used only for sdf corner calculations. The weights for summing color does not really matter - as sum of weights adds to 1.0. So only actual alpha usage is from sdf.

This code changes blur behavior a bit. It does the blur only wherever corner alpha is >= 0.9. But I believe this should not be noticeable, as you're always drawing borders of a box on top of it, so any "incorrectly" blurred sdf corner pixels will be covered by the box border.

Code includes bugfix when calculating kernel weights for smaller than 1px blur size for my previous PR.

@ryanfleury ryanfleury merged commit bae91cd into EpicGamesExt:dev Jan 23, 2024
@mmozeiko mmozeiko deleted the blur-no-alpha-blending branch January 23, 2024 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants