Garry's Mod Wiki

g_blurx

Description

Blurs $basetexture in the x direction.

Parameters

ITexture basetexture
The texture to blur.
number size
The strength of the blur. Actually the number of pixels between samples from $basetexture.

The response for a single white pixel (255) with $size 1 is { 0, 1, 2, 7, 16, 31, 45, 76, 45, 31, 16, 7, 2, 1, 0 }.
The response for $size 2, is the same response but with 0s are inserted in between each sample.
This is not a gaussian blur.

Note that the terms of the response sum to 280, not 255 (1.098 gain). Repeated application of this shader will result in a very bright screen unless some compensation is done (eg. Multiply by 255/280 using UnlitGeneric, $color Vector(255/280, 255/280, 255/280)).