

markShadow
{
	polygonOffset
	{
		map gfx/damage/shadow.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen exactVertex
	}	
}

// projectionShadow is used for cheap squashed model shadows

projectionShadow
{
	polygonOffset
	deformVertexes projectionShadow
	{
		map			*white
		blendFunc GL_ONE GL_ZERO
		rgbGen wave square 0 0 0 0				// just solid black
	}	
}




smokePuff
{
	cull none
	entityMergable		// allow all the sprites to be merged together
	{
		map gfx/misc/smokepuff3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen		vertex
		alphaGen	vertex
	}
}

hasteSmokePuff			// drops behind player's feet when speeded
{
	cull none
	entityMergable		// allow all the sprites to be merged together
	{
		map gfx/misc/smokepuff3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
                //blendfunc GL_ONE GL_ONE
		rgbGen		vertex
		alphaGen	vertex
	}
}

smokePuffRagePro
{
	cull none
	entityMergable		// allow all the sprites to be merged together
	{
		map gfx/misc/smokepuffragepro.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

shotgunSmokePuff
{
	cull none
	{
		map gfx/misc/smokepuff2b.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaGen entity		
		rgbGen entity
	}
}


//
// wall marks
// use blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR so that
// their "contribution" can be damped down in fog volumes
// with distance

bloodMark
{
	nopicmip			// make sure a border remains
	polygonOffset
	{
		clampmap gfx/damage/blood_stain.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen identityLighting
		alphaGen vertex
	}
}


gfx/decals/d_bullet_hit
{
	polygonOffset
	{
		map gfx/decals/d_bullet_hit.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen exactVertex
	}
}

gfx/decals/d_blade_hit
{
	polygonOffset
	{
		map gfx/decals/d_blade_hit.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen exactVertex
	}
}

gfx/decals/d_explode_hit
{
	polygonOffset
	{
		map gfx/decals/d_explode_hit.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen exactVertex
	}
}



gfx/decals/d_plasma_hit
{
	polygonOffset
	{
		map gfx/decals/d_plasma_hit.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
		alphaGen vertex
		blendFunc blend
	}
}

gfx/decals/d_electrobolt_hit
{
	polygonOffset
	{
		map gfx/decals/d_electrobolt_hit.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
		alphaGen vertex
		blendFunc blend
	}
}


//
// weapon hits
// All of these will be put on entities with a shaderTime offset, so they
// can be expected to start at time 0 for each separate explosion
//
// Many of these are use smoothly morphed animating textures by pairing
// sawtooth and iverse sawtooth rgbGens

models/weapon_hits/bullet/hit_bullet
{
	{
		map models/weapon_hits/bullet/hit_bullet
		rgbgen entity
		alphagen entity
		blendfunc blend
	}
}

models/weapon_hits/plasmagun/hit_plasmagun
{
	{
		rgbgen entity
		alphagen entity
		blendfunc blend
		map models/weapon_hits/plasmagun/hit_plasmagun
	}
}
models/weapon_hits/rlauncher/hit_rlauncher
{
	{
		map models/weapon_hits/rlauncher/hit_rlauncher.tga
		blendfunc gl_src_alpha gl_one
		rgbGen entity
		tcMod turb 0.6 0.3 0 1
		alphaGen wave sin 0.5 0 0 1 
	}
}

models/weapon_hits/rlauncher/hit_ring
{
	{
		map models/weapon_hits/rlauncher/hit_ring.tga
		blendfunc blend
		rgbGen entity
		alphaGen entity
	}
}
models/weapon_hits/glauncher/hit_glauncher
{
	{
		rgbgen entity
		alphagen entity
		blendfunc blend
		map models/weapon_hits/glauncher/hit_glauncher
	}
}

models/weapon_hits/electrobolt/beam
{
	sort nearest
	cull disable
	{
		map models/weapon_hits/electrobolt/beam.tga
		blendfunc add
//		rgbgen wave inversesawtooth 0 1 0 0.8
//		rgbgen entity
		rgbGen vertex
		alphaGen vertex
		tcMod scroll 0 50
	}
}

models/weapon_hits/electrobolt/lightning
{
	sort nearest
	cull disable
	{
		map models/weapon_hits/electrobolt/lightning.tga
		blendfunc add
//		rgbgen wave inversesawtooth 0 1 0 0.8
//		rgbgen entity
		rgbGen vertex
		alphaGen vertex
		tcMod scroll 0.1 0
		tcMod turb 0.5 0.02 0 1
	}
}

electroShock
{
	cull disable
	{
		animmap 3 models/weapon_hits/electrobolt/hit_electrobolt1.tga  models/weapon_hits/electrobolt/hit_electrobolt2.tga models/weapon_hits/electrobolt/hit_electrobolt3.tga
		rgbGen wave inversesawtooth 0 1 0 5
		blendfunc add
	}
//	{
//		animmap 3 models/weapon_hits/electrobolt/hit_electrobolt2.tga models/weapon_hits/electrobolt/hit_electrobolt3.tga gfx/colors/black.tga
//		rgbGen wave sawtooth 0 1 0 5
//		blendfunc add
//	}
}

bloodExplosion		// spurt of blood at point of impact
{
	cull disable
	{
		animmap 5 models/weaphits/blood201.tga models/weaphits/blood202.tga models/weaphits/blood203.tga models/weaphits/blood204.tga models/weaphits/blood205.tga
		blendfunc blend
	}
}
gfx/misc/waterBubble
{
	polygonOffset
	{
		map gfx/misc/waterBubble.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
		alphaGen vertex
		blendFunc blend
	}
}

//projectiles transparents

models/objects/projectile/plasmagun/plasma1
{
	{
		rgbgen entity
		alphagen entity
		blendfunc blend
		map models/objects/projectile/plasmagun/plasma1
	}
}

//gibs1

models/objects/gibs/sm_meat/gibs1.tga
{
	cull disable
	DeformVertexes autosprite
		{
		animmap 15 models/objects/gibs/sm_meat/gibs100.tga models/objects/gibs/sm_meat/gibs101.tga models/objects/gibs/sm_meat/gibs102.tga
		blendFunc blend
	}
}

powerups/quad
{
	deformVertexes wave 100 sin 0.75 0.5 0 1.5
	{
		map gfx/powerups/quad.tga
		blendfunc GL_ONE GL_ONE
        	  rgbgen wave sin 1 0.5 0 10
        	  tcmod scale 2 2
        	  tcmod scroll 0.25 0.5
		tcMod turb 0.6 0.3 0 0.2
	}
}

powerups/quadweapon
{
	{
		map gfx/powerups/quad.tga
		blendfunc GL_ONE GL_ONE
        	  rgbgen wave sin 1 0.5 0 10
        	  tcmod scale 2 2
        	  tcmod scroll 0.25 0.5
		tcMod turb 0.6 0.3 0 0.2
	}
}


gfx/misc/ebhit
{
	deformVertexes wave 100 sin 1 0 0 0
	{
		map gfx/misc/ebhit.tga
		blendfunc GL_ONE GL_ONE
        	tcmod scale 1 1
		tcMod turb 0.6 0.3 0 0.2
	}
}

