GM:RenderScreenspaceEffects

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

Description

Used to render post processing effects.

NOTE This is a rendering hook with a 2D rendering context.
This means that the only rendering functions will work in it are functions with a 2D rendering context.

Examples

Example

Renders color modify and sobel effects to create a cartoon effect.

local tab = {
	["$pp_colour_addr"] = 0,
	["$pp_colour_addg"] = 0,
	["$pp_colour_addb"] = 0,
	["$pp_colour_brightness"] = -0.04,
	["$pp_colour_contrast"] = 1.35,
	["$pp_colour_colour"] = 5,
	["$pp_colour_mulr"] = 0,
	["$pp_colour_mulg"] = 0,
	["$pp_colour_mulb"] = 0
}
function GM:RenderScreenspaceEffects()
	DrawColorModify( tab ) --Draws Color Modify effect
	DrawSobel( 0.5 ) --Draws Sobel effect
end


Personal tools
Navigation