------ All content © 2008 DigiPen (USA) Corporation, all rights reserved. ------
-- Author: Matt Anderson
-- Updated: 02/17/2009

--------------------------------------------------------------------------------
-- load render passes

Global:AddRenderPass(
    "gNentity",
    "gFlat",
    "gSlide",
    "gLantern",
    "gAster",
    "gVine",
    "gGroundGrass",
    "gGrass",
    "gFirefly",
    "gGround",
    "gSky",
    "gFireflyParticle",
    "gTitle",
    13,
	"TARGET", "Geometry",
	"CLEAR", "none",
	2,
	"GeometryPass"
)

Global:AddRenderPass(
    0,
	"TARGET", "Light",
	"SOURCE", "0 0 0 Geometry",
	"MATERIAL", "Defer",
	"FULLSCREENQUAD", "1 1",
	4,
	"AmbientPass"
)

Global:AddRenderPass(
	0,
	"TARGET", "Light",
	"SOURCE", "0 0 0 Geometry",
	"BLEND", "SourceAlpha One",
	"CULL", "Front",
	"DEPTH", "GreaterEqual",
	"NODEPTH", "none",
	"RENDERL", "lPointLight",
	7,
	"LightPass"
)

Global:AddRenderPass(
	0,
	"TARGET", "Light",
	"SOURCE", "0 0 0 Geometry",
	"BLEND", "SourceAlpha InvSourceAlpha",
	"RENDER", "lWater",
	4,
	"WaterPass"
)

Global:AddRenderPass(
	0,
	"TARGET", "Aux2",
	"SOURCE", "0 0 0 Light",
	"SOURCE", "1 2 1 Geometry",
	"MATERIAL", "pMotionBlur",
	"FULLSCREENQUAD", "1 1",
	5,
	"PostProcessMotionBlur"
)

--[[--]]
Global:AddRenderPass(
	0,
	"TARGET", "Aux0",
	"SOURCE", "0 0 0 Aux2",
	"MATERIAL", "pBlurHorz",
	"FULLSCREENQUAD", "2 2",
	"TARGET", "Aux1",
	"SOURCE", "0 0 0 Aux0",
	"MATERIAL", "pBlurVert",
	"FULLSCREENQUAD", "2 2",
	"TARGET", "BackBuffer",
	"SOURCE", "0 0 0 Aux2",
	"SOURCE", "1 0 0 Aux1",
	"SOURCE", "2 2 1 Geometry", --in slot 2 set 0th buffer of Geometry, only 1 buffer
	"MATERIAL", "pWeAreGears",
	"FULLSCREENQUAD", "1 1",
	14,
	"PostProcessGritty"
)


Global:AddRenderPass(
    "gDPLogo",
    "gPauseMenu",
    "gPopupMenu",
    "gDSMTitle",
	"Text",
	5,
	"TARGET", "BackBuffer",
	1,
	"LastPass"
)
--[[
Global:AddRenderPass(
	0,
	"TARGET", "BackBuffer",
	"SOURCE", "0 0 0 Aux1",
	"MATERIAL", "pDisplayBuffer",
	"FULLSCREENQUAD", "1 1",
	4,
	"DisplayBuffer"
)
--]]