DrawColorModify

From Garry's Mod
Jump to: navigation, search
 DrawColorModify( )

Contents

Description

Draws the Color Modify shader, which can be used to adjust colors on screen.

Arguments

table modifyParameters

Color modification parameters. See g_colourmodify shader and the example below. Note that if you leave out a field, it will retain its last value which may have changed if another caller uses this function.

Examples

Example

Draws color modify with bright yellow and green colors.

local tab = {
	[ "$pp_colour_addr" ] = 0.02,
	[ "$pp_colour_addg" ] = 0.02,
	[ "$pp_colour_addb" ] = 0,
	[ "$pp_colour_brightness" ] = 0,
	[ "$pp_colour_contrast" ] = 1,
	[ "$pp_colour_colour" ] = 3,
	[ "$pp_colour_mulr" ] = 0,
	[ "$pp_colour_mulg" ] = 0.02,
	[ "$pp_colour_mulb" ] = 0
}

hook.Add( "RenderScreenspaceEffects", "color_modify_example", function()

	DrawColorModify( tab )

end )


Personal tools
Navigation