Garry's Mod Wiki

g_blurx

Description

Blurs $basetexture in the x direction.

Parameters

basetexture [ITexture]

The texture to blur.

size [number]

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)).

Page Links


Special Pages


Wikis

?

Render Time: 133ms

DB GetPage 37
Generate Html 1
SaveChanges (1) 81
Render Body 0
Render Sidebar 11