gmod_game: Toytown PP effect

Revision 861
Toytown PP effect Added Files:
[ul]
[li]trunk/lua/postprocess/toytown.lua [/li][li]trunk/materials/pp/toytown-top.vmt [/li][li]trunk/materials/pp/toytown_gradient.vtf[/li][/ul]

Committed By Garry Newman

You should have it be more consistent with the other PP effects:



function DrawToyTown( NumPasses, H )
	cam.Start2D()
	
	surface.SetMaterial( _Material )
	surface.SetDrawColor( 255, 255, 255, 255 )
	
	for i=1, NumPasses do
	
		render.UpdateScreenEffectTexture()
		
		surface.DrawTexturedRect( 0, 0, ScrW(), H )
		surface.DrawTexturedRectRotated( ScrW() * 0.5, ScrH() - H * 0.5, ScrW(), H, 180 )
	
	end
	
	cam.End2D()
end

local function DrawInternal()

	if ( !pp_toytown:GetBool() ) then return end
	if ( !GAMEMODE:PostProcessPermitted( "toytown" ) ) then return end
	if ( !render.SupportsPixelShaders_2_0() ) then return end

	local NumPasses = pp_toytown_passes:GetInt()
	local H = ScrH() * pp_toytown_size:GetFloat();
	
	DrawToyTown( NumPasses, H )
end

So other scripts can run the effect.

Anyone fancy upload a screen shot of what this looks like?

Yeah, I’d like to see this too.

http://filesmelt.com/dl/gm_flatgrass00177.jpg

[editline]17th February 2011[/editline]

Height goes from 0 to 1, 0 being not covered, 0.5 being the screenshot, 1 being gaussian blur
Passes go from 1 to 100, 1 being barely blurry, 20 being the screenshot, 100 being ridonc blur (and ridonc fps drop)

[editline]17th February 2011[/editline]