Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off alpha blending when doing blur shader #108

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

mmozeiko
Copy link
Contributor

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
1 check passed
@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