diff --git a/Source/Engine/UI/GUI/Panels/BlurPanel.cs b/Source/Engine/UI/GUI/Panels/BlurPanel.cs
index 8d4525113..0fe506e44 100644
--- a/Source/Engine/UI/GUI/Panels/BlurPanel.cs
+++ b/Source/Engine/UI/GUI/Panels/BlurPanel.cs
@@ -11,9 +11,15 @@ namespace FlaxEngine.GUI
///
/// Gets or sets the blur strength. Defines how blurry the background is. Larger numbers increase blur, resulting in a larger runtime cost on the GPU.
///
- [EditorOrder(0), Limit(0, 100, 0.0f), Tooltip("Blur strength defines how blurry the background is. Larger numbers increase blur, resulting in a larger runtime cost on the GPU.")]
+ [EditorOrder(0), Limit(0, 100, 0.0f)]
public float BlurStrength { get; set; }
+ ///
+ /// If checked, the blur strength will be scaled with the control size, which makes it resolution-independent.
+ ///
+ [EditorOrder(10)]
+ public bool BlurScaleWithSize { get; set; } = false;
+
///
/// Initializes a new instance of the class.
///
@@ -27,10 +33,13 @@ namespace FlaxEngine.GUI
{
base.Draw();
- float strength = BlurStrength;
+ var size = Size;
+ var strength = BlurStrength;
+ if (BlurScaleWithSize)
+ strength *= size.MinValue / 1000.0f;
if (strength > Mathf.Epsilon)
{
- Render2D.DrawBlur(new Rectangle(Float2.Zero, Size), strength);
+ Render2D.DrawBlur(new Rectangle(Float2.Zero, size), strength);
}
}
}