Garry's Mod Wiki

Revision Difference

Shaders/g_blurx#516917

<cat>shader</cat> {{Shader⤶ |Description=Blurs $basetexture in the x direction.|Parameters=⤶ {{ShaderParameter|ITexture|basetexture|The texture to blur.}}⤶ <shader>⤶ <description>Blurs $basetexture in the x direction.</description>⤶ <parameters>{{ShaderParameter|ITexture|basetexture|The texture to blur.</parameters>⤶ ⤶ </shader>⤶ ⤶ ⤶ {{ShaderParameter|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 }. <br/> The response for $size 2, is the same response but with 0s are inserted in between each sample.<br/> 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)).