Garry's Mod Wiki

GM:GetMotionBlurValues

  number, number, number, number GM:GetMotionBlurValues( number horizontal, number vertical, number forward, number rotational )

Description

Allows you to modify the Source Engine's motion blur shaders.

Arguments

1 number horizontal
The amount of horizontal blur.
2 number vertical
The amount of vertical blur.
3 number forward
The amount of forward/radial blur.
4 number rotational
The amount of rotational blur.

Returns

1 number
New amount of horizontal blur.
2 number
New amount of vertical blur.
3 number
New amount of forward/radial blur.
4 number
New amount of rotational blur.

Example

Makes your forward/radial blur pulse.

hook.Add( "GetMotionBlurValues", "GetNewMotionBlurValues", function( horizontal, vertical, forward, rotational ) forward = forward * math.sin( CurTime() * 5 ) return horizontal, vertical, forward, rotational end )
Output: Your radial blur pulses.