G.DrawColorModify

From GMod Wiki

Jump to: navigation, search
Function
Syntax DrawColorModify( Table table )
Where is this used?
Description:
Used by the "ColorMod" Post-processing effect. It effects the screen color based on the values in the table that it's passed.
Returns: nil
Part of Library: Global Functions
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.DrawColorModify]G.DrawColorModify [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis makes the screen Red.
Used onNewerClient.png
Code
local function PUMPPPTEST()
 
	local tab = {}
	tab[ "$pp_colour_addr" ] = 250
	tab[ "$pp_colour_addg" ] = 0
	tab[ "$pp_colour_addb" ] = 0
	tab[ "$pp_colour_brightness" ] = 0
	tab[ "$pp_colour_contrast" ] = 1
	tab[ "$pp_colour_colour" ] = 1
	tab[ "$pp_colour_mulr" ] = 0
	tab[ "$pp_colour_mulg" ] = 1
	tab[ "$pp_colour_mulb" ] = 1 
 
	DrawColorModify( tab )
end
hook.Add( "RenderScreenspaceEffects", "RenderColorModifyPOO", PUMPPPTEST )
 
OutputN/A


Additional Notes

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

See Also


Color wheel.pngPost Processing

Hook: RenderScreenspaceEffects


Functions:
- DrawBloom -
- DrawColorModify -
- DrawMaterialOverlay -
- DrawMorph -
- DrawMotionBlur -
- DrawSharpen -
- DrawSobel -
- DrawSunBeams -
- DrawToyTown -


For usage of the Sandbox Post Processing menu, see Post Processing Menu.

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox