//**********************************************************************//
//									//
//	shaders.shader							//
//									//
//**********************************************************************//

//**********************************************************************//
// sound tests
//**********************************************************************//

soundSolid
{
	shader alpha
	texture shaderAlpha
   
   sound solid
}

soundMetalthin
{
	shader detail
	texture shaderDetail
	detail detailMap
	detailscale 8
   
   sound metalthin
}

soundSilent
{
	shader envmap
	texture shaderEnvmap
	envmap cubeMap
   
   sound silent
}

MS_Ground_Base_01
{
   shader default
   texture MS_Ground_Base_01
   sound dirt
}

AR_Moss
{
   shader default
   texture AR_Moss
   sound grass
}

Creep_
{
   shader default
   texture Creep_
   sound creep
}

//**********************************************************************//
// sound tests
//**********************************************************************//

shaderAlpha
{
	shader alpha
	texture shaderAlpha
}

shaderDecal
{
   qer_surfaceparm decal
   
   shader masked
   texture GE_BulletMark1   
}

shaderDetail
{
	shader detail
	texture shaderDetail
	detail detailMap
	detailscale 8
}

shaderEnvmap
{
	shader envmap
	texture shaderEnvmap
	envmap cubeMap
}

shaderEtchedGlass
{
	shader etchedglass
	texture Marine_shaders
	envmap cubeMap_Lights
	glossmap Marine_shader_glossmap
}

shaderGlass
{
   sound plastic
   shader glass
	texture baseTexture
	envmap cubeMapBlueSky
	intensity 0.1
	alpha 0.7
}

shaderGlossmap
{
	shader glossenvmap
	texture shaderGlossMap
	envmap cubeMapGreySky
}

shaderGlow
{
	shader glow
	texture shaderGlow
	glow glowMap
	intensity 1
}

shaderMasked
{
	shader masked
	texture shaderMasked
}

shaderScanline
{
	shader scanline
	texture shaderScanline
	detail GE_detail_scanlines.dds
	detailscale 10.0
	envmap cubeMap
	reflect 0.2
	speed 3
}

shaderWater
{
   shader water
	texture baseTextureBlack
	envmap cubeMapGreySky
	alpha 0.3
	reflect 0.5
	texturescale 0.5
}

testproject
{
	shader projectcube
	projectmap ge_env_flashlight_blu
}

project_target
{
	shader		boxproject
	projectmap	calldownReticle
}

project_fanblades
{
	shader      projectcube
   projectmap  GE_env_fanBlades1
}

project_siren
{
	shader      project
   projectmap  GE_env_siren1
}

project_flashLight_01
{
	shader		project
	projectmap	GE_flashLight_blu
}

project_breakLight_01
{
	shader 	   project
	projectmap	GE_flashlight_blu
}

project_neonBreakLight_01
{
	shader 	   project
	projectmap	ge_neonTubeLight
}

project_grateLight_01
{
	shader 	   project
	projectmap	V5_grateLight_01
}

project_cubeGrateLight
{
	shader 	   projectcube
	projectmap	V5_env_grateLight
}

project_spotLight_01
{
	shader		project
	projectmap	GE_1overX
}

project_slatLight_01
{
	shader		project
	projectmap	GE_slatLight_01
}

project_fanBlades_01
{
	shader		project
	projectmap	GE_fanBlades_01
}

;testblob
;{
;	shader lightblob
;	size	8.0
;	color	0xff800000
;	marker 5
;}

;testdynlight
;{
;	shader dynamiclight
;	size 10.0
;	intensity 10.0
;	color 0xffffffff
;	marker 5
;	typeFlags	0x01
;	falloff 1.0
;}

effectInvis
{
	shader invis
	envmap cubeMapGreySky
	intensity 0.5
}

;effectSightWorld
;{
;	shader sight
;	intensity 0.5
;	texture ge_scanlines
;}

effectSightCool
{
	shader sight
	texture ge_memb_sightcool
}

effectSightHot
{
	shader sight
	texture ge_memb_sighthot
}

effectSightMedium
{
	shader sight
	texture ge_memb_sightMedium
}

effectSightCritical
{
	shader sight
	texture ge_memb_sightCritical
}

effectSightInteractive
{
	shader sight
	texture ge_memb_sightInteractive
}

effectSightPanel
{
	shader sight
	texture ge_memb_sightPanel
}

effectSightOccluded
{
	shader sight
	texture ge_memb_sightOccluded
}

effectComsat
{
	shader comsat
	intensity 0.5
	texture ge_scanlines
}

effectLockdown
{
	shader lockdown
	envmap ge_env_elec
}

effectLockdownSkin
{
	shader animlayer
	mode	2
	texture	GE_PAR_ElectricParticles
	scale0 (1.0,0.5)
	slide0 (0.0,0.3)
	texture2	GE_PAR_ElectricParticles
	scale1 (1.0,3.0)
	slide1 (0.0,0.5)
}
	

effectSpeed
{
	shader speed
}

MarineLightHalo
{
	shader	halo
	marker	60
	size		0.1
	texture	GE_PAR_Lensflare1_blue
}

TestLava
{
   qer_surfaceparm nonsolid
	qer_editorimage	stone\CH_lavabase_glo
	shader 	lava
	texture		CH_lavabase_glo
	envmap		GE_bmp_lava
	texture2	CH_lavanoise
	mask		ch_lavafloor_msk	
}

TestWater
{
	qer_editorimage	colors\AR_SwatchExt01_Blu02
	shader 	lava
   texture		waterTest
	envmap		GE_bmp_lava
	texture2	AR_SwatchExt01_Blu01
	mask		ch_lavafloor_msk	
}

TestAnim
{
	qer_editorimage	stone\CH_lavabase_glo
	shader	anim
	texture	CH_lavabase_glo
	translate	(0.1,0.1,0.1)
	rotate		(0,0,10.0)
}

TestScreenSpace
{
	shader	screenEffect
	texture	embump
}

TestDynamic
{
	shader	dynamic
	dynShaderDef	
	{
	  ; Pass 1
	  {
		zwrite		true			; write to the zbuffer
		zfunc		zfunc_on		; Use the zbuffer
		blend		false			; Just put the resulting pixel straight into the framebuffer
		alphatest	false			; No alpha here, no need to test for it
		cull		cull_pos

		tfactor		0x0000ff00		; Set a base green amount (full)
		colorgen	r sin 0 1 0 0.2		; Make the R channel fluctuate
		colorgen	b sin 0 1 0.5 0.2	; Make the B channel fluctuate exactly out of phase with the R
		
		; Stage 0 - Base layer
		{
			texture		AR_RockMossy_01
			colorOp		texOp_selectArg1	texArg_texture
			alphaOp		texOp_selectArg1	texArg_texture
			clamp		clamp_wrap
			uvindex		0
		}
		; Stage 1 - Scrolling and pulsing layer
		{
			texture		AR_RockMossy_01
			colorOp		texOp_multiplyadd	texArg_texture	texArg_tfactor	texArg_current
			alphaOp		texOp_selectArg1	texArg_texture
			clamp		clamp_wrap
			uvindex		0

			tcMod		u scroll sin 0 1 0 0.5	; Make this layer scroll back and forth (only in U)
		}
		; Stage 2 - Lightmap
		{
			texture		$lightmap
			colorOp		texOp_modulate		texArg_current	texArg_texture
			clamp		clamp_nowrap				; Don't want to wrap
			uvIndex		1					; Use the 2nd set of UVs from the verts
		}
		; NoLightmap stage - This stage only occurs when there is no lightmap (and the lightmap stage is skipped)
		{
			noLightmapStage
			colorOp		texOp_modulate		texArg_current	texArg_diffuse
		}
	  }
	}
}

; This is the same shader as above, but with all defaulted values removed
;TestDynamic2
;{
;	shader	dynamic
;	dynShaderDef	
;	{
;	  ; Pass 1
;	  {
;		tfactor		0x0000ff00		; Set a base green amount (full)
;		colorgen	r sin 0 1 0 0.2		; Make the R channel fluctuate
;		colorgen	b sin 0 1 0.5 0.2	; Make the B channel fluctuate exactly out of phase with the R
;		
;		; Stage 0 - Base layer
;		{
;			texture		AR_RockMossy_01
;		}
;		; Stage 1 - Scrolling and pulsing layer
;		{
;			texture		AR_RockMossy_01
;			colorOp		texOp_multiplyadd	texArg_texture	texArg_tfactor	texArg_current
;
;			tcMod		u scroll sin 0 1 0 0.5	; Make this layer scroll back and forth (only in U)
;		}
;		; Stage 2 - Lightmap
;		{
;			texture		$lightmap
;			colorOp		texOp_modulate		texArg_current	texArg_texture
;			clamp		clamp_nowrap				; Don't want to wrap
;			uvIndex		1					; Use the 2nd set of UVs from the verts
;		}
;		; NoLightmap stage - This stage only occurs when there is no lightmap (and the lightmap stage is skipped)
;		{
;			noLightmapStage
;			colorOp		texOp_modulate		texArg_current	texArg_diffuse
;		}
;	  }
;	}
;}

TestEnvDynamic
{
	shader dynamic
	dynshaderdef
	{
		; Pass 1
		{
			fog		true	fog_current		

			; Shininess
			tfactor		0x7F000000		
		
			; Stage 0 - Base layer
			{
				texture		shaderEnvmap
				alphaOp		texOp_selectArg1	texArg_tfactor
			}
			; Stage 1 - Envmap
			{
				texture		cubeMap	cubemap
				colorOp		texOp_modulateAlpha_addColor	texArg_current	texArg_texture
				uvIndex		1	uvif_csreflect
				uvtransform	$uvtt_invcamera	uvtf_count3
			}
		}
	}
}

TestDynamicPageFlip
{
	shader dynamic
	dynshaderdef
	{
		; Pass 1
		{
			; Stage 0 - Base, pageflipping layer
			{
				animmap		0.5	0.3	MS_Mtn_Dark MS_Grass_Grn MS_Mtn_Pink MS_Rock
			}
		}
		
		; Pass 2 -- This is just to demonstrate using multiple passes...this acts like a lightmap
		{
			blend	true	blendOp_Add	blend_destColor	blend_zero
			zwrite	false

			; Stage 0 - Add a texture
			{
				texture		AR_SwatchExt01_Blu01
			}
		}
	}
}

psiHemisphere
{
	shader		psishieldhit
	texture		psiHemisphere
	;texture2		ge_cloakMembrane
	startcolor	0x80008080
	endcolor		0x00000000
}
 
teleport
{
	shader	teleport
	texture	GE_PAR_ElectricParticles
}

cloak
{
	shader		cloak
	texture		ge_cloakMembrane
	instance
}

distort
{
	shader		cloak
	reflect		22.0
	instance
}

playercloak
{
	shader		cloak
	texture		ge_cloakMembrane
	texture2	GE_1overXlinear
	texture4	GE_dcl_BulletholeGlass
	mask		NovaBody_Cloaking
	reflect		12.0
	instance
}
 
observercloak
{
	shader		cloak
	texture2	GE_PAR_Spurt
	reflect		12.0
	sightforcecritical
	instance
}


ghostcloak
{
	shader		cloak
	texture2	GE_PAR_Spurt
	mask		Ghost_Male_Cloaking
	reflect		12.0
	sightforcecritical
	instance
}

generatorcloak
{
	shader		cloak
	texture2	GE_PAR_Spurt
	reflect		12.0
	sightforcecritical
}

testMembrane
{
	shader membrane
	texture ge_memb_purp
}

observer_cloak
{
	shader cloak
	instance
}

GE_bump
{
   qer_bump

   shader      bump
   bumpmap     GE_Crate_03_bmp
   texture     GE_Crate_03_sml
}

GE_bumpEnv
{
   qer_bump

	shader	bumpenv
	bumpmap	LurkerBump.dds
	texture Lurker.dds
	envmap V5_env_hallWay_01.dds
}

GE_bumpWater
{
   qer_bump
   qer_surfaceparm nonsolid
   qer_trans   0.0	
	qer_editorimage	effects/SpawningPool
   
	shader		bumpwater
	texture		SpawningPool
	waterbump0	GE_bmp_SpawningPool_01
	waterbump1	GE_bmp_SpawningPool_02
	slide0		0.0 -0.24
	slide1		-0.3 -0.5
	envmap		GE_env_nature
	intensity	0.9
}

Glowmode1Test
{
	shader glow
	texture Glowmode1Test_01
	glow Glowmode1Test_02
	mode 1
} 

