DrawBlurRect

Draw a rectangular region that blurs the pixels underneath it, with an optional colored tint on top.

Syntax

Susano.DrawBlurRect(x, y, w, h[, strength][, rounding][, tintR, tintG, tintB[, tintA]]) -> void

Parameters

x, y (number): Top-left corner in pixels.

w, h (number): Width and height in pixels.

strength (integer, optional): Blur strength (higher = more blur). Default: 3.

rounding (number, optional): Corner rounding in pixels. Default: 0.0.

tintR, tintG, tintB (number, optional): Tint color components in [0..1]. Only applied when all three are provided.

tintA (number, optional): Tint alpha in [0..1]. Default: 1.0. Only used when the tint RGB is provided.

Return(s)

None

Behavior

Enqueues a blur rectangle in the current build buffer. The rectangle blurs whatever is drawn beneath it in the same frame.

If a tint color is supplied, it is composited on top of the blurred region, producing a "frosted glass" effect similar to iOS/macOS UI panels.

Not rendered until Susano.SubmitFrame() is called.

Example(s)

Susano.BeginFrame()

-- Plain blur without tint
Susano.DrawBlurRect(100, 100, 300, 200, 5, 12)

-- Frosted-glass panel with a subtle orange tint
Susano.DrawBlurRect(500, 100, 300, 200, 6, 12, 1.0, 0.48, 0.33, 0.15)

Susano.SubmitFrame()