Blur

Softens a texture with a gaussian blur.

Outputs

NameTypeDescription
Texture OutputTextureThe blurred texture.

Inputs

NameTypeDescription
Texture InputTextureThe texture to blur.
MaskTextureWhere the blur applies. Its red channel goes from 0 for sharp to 1 for fully blurred. With nothing connected the whole texture is blurred.

Parameters

NameTypeDescription
Output FormatEnumWhether the output takes the size and type of the input or uses the settings below.Choices: Copy Input, Manual
Texture TypeEnumThe channels of the output texture. Follows the input unless the output format is Manual.Choices: R (u8), RG (u8), RGBA (u8)
Texture SizeVector 2 IntThe size of the output texture in pixels. Follows the input unless the output format is Manual.
RadiusFloatHow far the blur reaches, in pixels of the output. 0 leaves the texture sharp and 64 is the most.

Blur softens a texture by spreading every pixel over its neighbours. It is a gaussian blur, the kind that looks like a lens out of focus, with no visible edges to the blur. The radius says how far the spreading reaches. Small values take the edge off, large values turn the texture into soft patches of color.

The mask limits where the blur happens. Where the mask is white the texture is blurred, where it is black it stays sharp, and gray gives a partial blur. A soft mask makes a depth of field effect, sharp in one place and soft elsewhere.

At the edges of the texture the blur uses the edge pixels, so nothing wraps around from the other side. A larger radius costs more, because every pixel looks at more neighbours. A cheaper way to blur a lot is to blur a smaller texture and scale it up afterwards.

Keywords: soften, smooth, gaussian, defocus, bloom, glow