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

Shader performance improvements #104

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

mmozeiko
Copy link
Contributor

This improves performance for rect and blur shaders.

For UI rect shader - main change is moving color & sdf_sample_pos calculation to vertex shader, and then letting hardware rasterizer to do interpolatation of them instead of manual arithmetic in shader (the fewer varyings the better!)

And blur shader now does bilinear sampling to read texture samples - hw bilinear lerp reads two pixels in on sample operation. The weights are adjusted to calculate the same blurring weights.

Plus some minor math simplifications in vertex shaders.

@ryanfleury ryanfleury merged commit 1705fdd into EpicGamesExt:dev Jan 23, 2024
1 check passed
@mmozeiko mmozeiko deleted the shader-improvements branch January 23, 2024 22:59
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