Skip to content

Conversation

@mmozeiko
Copy link
Collaborator

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
@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