Skip to content

EffectBox is an Unreal Engine widget for UI post-effects

License

Notifications You must be signed in to change notification settings

slonopotamus/EffectBox

Repository files navigation

Effect Box

EffectBox is a highly-performant widget for Unreal Engine that allows applying custom materials.

Supports Unreal Engine 4.27 and newer.

Use cases

  • Curved HUD

  • HUD shake/displacement during movement or taking damage

  • Any other UI post-effects

How to use

  1. Create a material with "User Interface" domain and "Alpha Composite (Premultiplied Alpha)" blend mode

  2. Add EffectBox to your UMG widget

  3. Specify your material in "Effect Material" widget field

  4. Specify texture parameter name in "Texture Parameter" widget field

  5. You’re done!

Note
If you used RetainerBox for the same purpose before, you can just replace it with EffectBox.

Example

Minimal material

3415054c 4c85 46c7 8604 956fefa00ef2

Example Widget

f11dd6cc a20c 4894 b3f2 c9d6f178b61e

What’s wrong with RetainerBox?

  • RetainerBox doesn’t play well with Slate Global Invalidation. It invalidates too much aggressively, resulting in bad performance. At least as of UE-5.4, RetainerBox fully disables FastPath update. With complex UIs, EffectBox is able to save up to multiple milliseconds compared to RetainerBox.

  • RetainerBox had long-standing bugs (UE-107863, UE-114934, UE-203471 and so on) that only got fixed in Unreal Engine 5.4.

  • RetainerBox is complex. Its primary goal is to reduce UI redraw rate, which it implements by caching UI in a render target. Actually, that could even be achieved without introducing a render target, so it is questionable whether RetainerBox solves even its main task effectively. When one uses RetainerBox to draw each frame just to apply visual effects, it is an ineffective overkill.

About

EffectBox is an Unreal Engine widget for UI post-effects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published