Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slonopotamus/effectbox
EffectBox is an Unreal Engine widget for UI post-effects
https://github.com/slonopotamus/effectbox
umg unreal-engine
Last synced: 4 months ago
JSON representation
EffectBox is an Unreal Engine widget for UI post-effects
- Host: GitHub
- URL: https://github.com/slonopotamus/effectbox
- Owner: slonopotamus
- License: mit
- Created: 2024-07-19T08:32:28.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T08:48:31.000Z (6 months ago)
- Last Synced: 2024-08-09T11:00:00.596Z (6 months ago)
- Topics: umg, unreal-engine
- Language: C++
- Homepage:
- Size: 78.1 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 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]]
== Use cases* Curved HUD
* HUD shake/displacement during movement or taking damage
* Any other UI post-effects[[usage]]
== How to use. Create a material with "User Interface" domain and "Alpha Composite (Premultiplied Alpha)" blend mode
. Add `EffectBox` to your UMG widget
. Specify your material in "Effect Material" widget field
. Specify texture parameter name in "Texture Parameter" widget field
. You're done!NOTE: If you used RetainerBox for the same purpose before, you can just replace it with EffectBox.
[[example]]
== Example.Minimal material
image:https://github.com/user-attachments/assets/3415054c-4c85-46c7-8604-956fefa00ef2[width=640].Example Widget
image:https://github.com/user-attachments/assets/f11dd6cc-a20c-4894-b3f2-c9d6f178b61e[width=640][[retainerbox]]
== What's wrong with RetainerBox?* RetainerBox doesn't play well with https://dev.epicgames.com/documentation/en-us/unreal-engine/invalidation-in-slate-and-umg-for-unreal-engine[Slate Global Invalidation].
It invalidates too much aggressively, resulting in bad performance.
At least as of UE-5.4, RetainerBox https://github.com/EpicGames/UnrealEngine/blob/5.4.3-release/Engine/Source/Runtime/UMG/Private/Slate/SRetainerWidget.cpp#L723-L732[fully disables FastPath update].
With complex UIs, EffectBox is able to save up to multiple milliseconds compared to RetainerBox.
* RetainerBox had long-standing bugs (https://issues.unrealengine.com/issue/UE-107863[UE-107863], https://issues.unrealengine.com/issue/UE-114934[UE-114934], https://issues.unrealengine.com/issue/UE-203471[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.