table xianjittertable { { 0.9, 0.95, 0.92, 0.99, 0.85 } }
table xianjittertable_hi { { 0.9, 0.95, 0.92, 0.99, 0.85 } }
table xianjittertable_low { { 0.05, 0.2, 0.1, 0.15, 0.09 } }
table xray02table { { 1, .8, .8, 1, 1, .8, .8, .9, 1, .8, 1, .9, .8, 1, 1, 1, .9, .7, .8, 1, .8, 1, .8 } }
table senescrollightable { { -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0 } }
table senescrollightableA { { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 } }
table sargetable1 { { 1, 1, .2, 0, 0, 0, .2 } }
table sargetable2 { { 0, .2, 1, 1, .2, 0, 0 } }
table sargetable3 { { 0, 0, 0, .2, 1, 1, .2 } }
table firetable { { .3, .2, .8, .1, .2, .3, .1, .5, .1, 1, .2, .3, .3, .2, .1, .1, .7 } }
table firetable2 { { .7, .9, 1, .8, 1, .9, .7, .5, 1, 1, .7, .5, 1, 1, .5, 1, .8 } }
table strobetable { { 0, 0, 0, 0, 1, 1 } }
table blinktable { { 0, 1 } }
table blinksnaptable { snap { 0, 1 } }
table flashtable { { 0, 0, 0, 0, .5, 0, .5, 0, 0, 0, 0, 0, .5, 0, .5, 0, .5, .5, 0, 0, 0, .5, 0, 1, 0, 1, 0, 0, 0, 0, .5 } }
table neontable1 { { .3, 0, 0, 0, 0, .3, 0, 0, 0, 0, .3, 0, 0, .1, .075, .15, .22, .3, .3, .45, .52, .6, .67, .75, .82, .9, .95, 1, 0, 0, 0, .3, 0, 0, 0, 0, 0, 0, 0, .3, 0, 0, 0, 0, 0, 0, 0, 0, 1, .6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, .3, 0, 0, 0, 0 } }
table neontable2 { snap { 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1 } }
table blinktable2 { snap { 0, 0, 0, 1 } }
table blinktable3 { { 1, 1, 1, 1, 1, 1, 0 } }
table blinktable4 { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 } }
table blasttable { { 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, .6, .9, .3, .5, 0, .2, 0, 0, 0, 0, 0, 2, 2, 1 } }
table stormtable { snap { 1, 1, .3, 1, .1, .3, .1, .1, .4, 1, 1, 2, 1, 1, 2, 1, .1, .1, .1, 1, .1, .3, 5, .2, .2, 1, .5, 1, .1, 1, .2, .6, 1, 1, .2, 1, 1, 1, 1, .1, .6, 1, .1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0.4, 2, 2, 2, .2, .1, 1, 1, 1, .5, 0, 1, 1, 1, 1, 1, .1, .1, 2, 1, 1, 1, 1, 1, 1, 1, .1, 2, 1, 1, 1, 1, 1, 1, 1, 1, .1, 4, 1, 1 } }
table flickerblink { { 0, .3, .1, .5, .3, .8, .9, .5, .2, .1, .7, .4, 1, .2, .5, 0, .2, .7, .5 } }
table acceleratorfade { { .1, .2 } }
table acceleratorflashtable2 { clamp { 4, 2, 1, 1, 1, 1, 1, 1, 1, .1, .1, .1, .1  } }
table bathroomtable { { .7, 1, .6, .8, .6, .6, .6, .7, .8, 1, 1, .9, .7, .8, 1, .7, .7, .8, .6, .7, .7, .8, .6, .9, .7, .9, 1 } }
table bathroom2table { { .9, 1, 1.6, .8, 2, 1, 1.5, 1.7, .8, 1, 1.2, .9, .9, .8, 1.3, .8, .9, .8, 1.6, .7, 1.7, .9, 1.1, .9, .8, .9, 1 } }
table firelightrot { { 13, 16, 123, 256, 90, 12, 190, 160, 1, 59, 280, 150, 15, 280 } }
table delta1randtable { { 1, 0, 1, 1, 0, .5, .2 } }
table speaker_1 { { 1, 1 } }
table blinktable5 { snap { 0, 0, 0, 1, 0, 1, 0, 0, 0 } }
table guiLightTable { { 1, 1, 0.6 } }
table storm2table { snap { 1, .1, 1, 0, .7, .1, .1, .1, .1, .1, .1, .1, 0, 1, 0, 1, .1, .1, .1, .1, .1, .1, .1, .1, 1, .1, .1, .1, .1, .1, .1, .1, 1, 0, 1, 1, .1, .1, .1, .1, .1, .1, .1, .1, .1, 1, 0, .7, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, .1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0, 0.1, 0, 0.1, 0.1, 0, 0.1, 0, 0, 0.1, 0, 0 } }
table meattable { snap {  0, .1, 0, 0, 0, 1, .5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 , 0, .3, 0, .3, 0, .7, 0, 0, 0,.1,.1,.1,.1,0,0,0, 0, .3, 0, .3, 0, 1,1, 0, .3, 0, .7 } }
table ropelight { { .92, .95, .96, .98, .95, .92, .85, .91, .955, .98, 1, 1, 1, .95, .91, .9 } }


lights/meatlight
{	

	{
		forceHighQuality		
		map	lights/stormy2.tga
		colored
	    rotate	time * .1
		zeroClamp
		rgb		meattable[ time * .2 ]
	}

}


lights/ring
{	
	{
		forceHighQuality
		map lights/ring
		colored
		zeroclamp
		
	}
}


lights/squareblast
{	
	{
		forceHighQuality
		map lights/squareblast
		colored
		zeroclamp
		
	}
}


lights/biground1_strobe

{
	{
		forceHighQuality
		map		lights/biground1.tga
		red 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm0
		green 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm1
		blue 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm2
		zeroclamp
	}
}


lights/bfg_flare
{
	{
		forceHighQuality
		map	lights/roundfire.tga
		red 	( firetable2 [Parm4 + (time / 6) ]) * Parm0
		green 	( firetable2 [Parm4 + (time / 6) ]) * Parm1
		blue 	( firetable2 [Parm4 + (time / 6) ]) * Parm2
		rotate	firelightrot [ time * parm3 ]
		zeroClamp
	}
	//{
	//	map	lights/roundfire.tga
	//	red 	( firetable2 [Parm4 + (time / 3) ]) * Parm0
	//	green 	( firetable2 [Parm4 + (time / 3) ]) * Parm1
	//	blue 	( firetable2 [Parm4 + (time / 3) ]) * Parm2
	//	rotate	firelightrot [ time * (2 * parm3) ]
	//	zeroClamp
	//}
}


lights/barrelexplode
{
	{
		forceHighQuality
		map	lights/spot01.tga
		red		1
		green	0.75
		blue	0.51
		zeroClamp
	}
}

lights/redglow
{	
	{
		forceHighQuality
		map	lights/squarelight
		red 	bathroomtable [ time * .02 ] * Parm0
		green 	bathroomtable [ time * .02 ] * Parm1
		blue 	bathroomtable [ time * .02 ] * Parm2
		//colored
		//
		zeroClamp
	}
}

lights/roundfire2
{
	{
		forceHighQuality
		map	lights/roundfire.tga
		red 	( firetable2 [Parm4 + (time / 6) ]) * Parm0
		green 	( firetable2 [Parm4 + (time / 6) ]) * Parm1
		blue 	( firetable2 [Parm4 + (time / 6) ]) * Parm2
		rotate	firelightrot [ time * (2 * parm3) ]
		zeroClamp
	}
}

lights/popanimlight
{

	
	{
		forceHighQuality
		map textures/particles/rocketstripsmall.tga
		red 1
		blue 0
		green .5

		scale 1 / 32 , 1
		scroll table32[ time * 1.6 ] , 0
		//rotate	( time * -.2 )
		zeroclamp
	}


}


lights/dropship
{	
	{
		forceHighQuality
		map lights/dropship
		colored
		zeroclamp
		
	}
}

lights/falloff_exp1
{	
	{
		forceHighQuality
		map lights/falloff_exp1
		colored
		zeroclamp
		
	}
}

lights/falloff_exp2
{	
	{
		forceHighQuality
		map lights/falloff_exp2
		colored
		zeroclamp
		
	}
}

lights/falloff_exp3
{	
	{
		forceHighQuality
		map lights/falloff_exp1
		colored
		zeroclamp
				
		red	1 * ropelight[time * 3 ]	
		green	0.85 * ropelight[time * 3 ]
		blue	0.5 * ropelight[time * 3 ]

	}
}

lights/end_cin
{	
	{
		forceHighQuality
		map lights/end_cin
		colored
		zeroclamp
		
	}
}


lights/headlights
{	
	{
		forceHighQuality
		map lights/headlights
		colored
		zeroclamp
		
	}
}


lights/cloudscroll
{	
	{
		forceHighQuality
		map	lights/cloudscroll
		colored
		translate	time * 0 , time * -0.05
		//rgb		storm2table[ time * .1 ]
		
	}
}

lights/cloudscroll2
{	
	{
		forceHighQuality
		map	lights/cloudscroll2
		colored
		translate	time * .03 , time * .03
		//rgb		storm2table[ time * .1 ]
		
	}
}

lights/cloudscroll3
{	
	{
		forceHighQuality
		map	lights/cloudscroll3
		colored
		translate	time * 0 , time * -0.05
		rgb		storm2table[ time * .1 ]
		
	}
}

lights/cloudturn
{	
	{
		forceHighQuality
		map	lights/cloudturn
		colored
		rotate	time * -.03
		zeroClamp
		
	}
}

lights/stormy1
{	

	{
		forceHighQuality
		map	lights/stormy2.tga
		colored
	    rotate	time * .1
		zeroClamp
		rgb		stormtable[ time * .3 ]
	}

}


lights/lightgratelight2
{	
	{
		forceHighQuality
		map	lights/lightgratelight2
		colored
		zeroClamp
	}
}



lights/lightgratelight
{	
	{
		forceHighQuality
		map	lights/lightgratelight
		colored
		zeroClamp
	}
}


lights/square_strobe_slow
{
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( blinktable5 [Parm4 + (time * 0.075 * (6 * Parm3)) ]) * Parm0
		green 		( blinktable5 [Parm4 + (time * 0.075 * (6 * Parm3)) ]) * Parm1
		blue 		( blinktable5 [Parm4 + (time * 0.075 * (6 * Parm3)) ]) * Parm2
		zeroclamp
	}
}


lights/tempspectrum
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	spectrum 2
	{
		forceHighQuality
		map lights/tempspectrum1.tga
		colored
		rotate		time
		zeroClamp
	}
	{
		forceHighQuality
		map lights/tempspectrum2.tga
		colored
		rotate		time*-.5
		zeroClamp
	}

}

lights/spectrum2Light_round
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	spectrum 2	
	{
		forceHighQuality
		map lights/spot01
		colored
		
		zeroClamp
	}
}

lights/spectrum2Light
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	spectrum 2	
	{
		forceHighQuality
		map lights/fullambient.tga
		colored
		zeroClamp
	}
}

// this is placed in front of the guis on view weapons, like the plasma gun and machinegune
lights/viewWeaponGuiLight
{	
	noShadows
	{
		forceHighQuality
		map	lights/squareishlight.tga
		red		0.1 * guiLightTable[ time ]
		green	0.6 * guiLightTable[ time ]
		blue	0.6 * guiLightTable[ time ]
		zeroClamp
	}
}


lights/plasmaglow
{
	noshadows
	{
		forceHighQuality
		map    textures/particles/plasmalight.tga
		//map	lights/floorvent01blue.tga
		colored
		rgb		bathroomtable[ time * .2 ]
		rotate	time * -.1
		zeroClamp
	}
}

lights/sentrylight
{	
	{
		forceHighQuality
		map	lights/sentrylight
		rgb		bathroomtable[ time * .05 ] 
		colored
		//
		zeroClamp

	}
}


lights/lanternglow
{	
	{
		forceHighQuality
		map	lights/lanternglow
		rgb		bathroomtable[ time * .05 ] 
		colored
		//
		zeroClamp

	}
}

lights/newalphagrate1
{	
	{
		forceHighQuality
		map	lights/newalphagrate1
		colored
		zeroClamp
	}
}

lights/newalphagrate2
{	
	{
		forceHighQuality
		map	lights/newalphagrate2
		colored
		zeroClamp
	}
}

lights/newalphagrate3
{	
	{
		forceHighQuality
		map	lights/newalphagrate3
		colored
		zeroClamp
	}
}

lights/newalphagrate3b
{	
	{
		forceHighQuality
		map	lights/newalphagrate3b
		colored
		zeroClamp
	}
}

lights/newalphagrate4
{	
	{
		forceHighQuality
		map	lights/newalphagrate4
		colored
		zeroClamp
	}
}

lights/newalphagrate5
{	
	{
		forceHighQuality
		map	lights/newalphagrate5
		colored
		zeroClamp
	}
}


lights/squareishlight
{	
	{
		forceHighQuality
		map	lights/squareishlight.tga
		colored
		zeroClamp
	}
}

lights/biground1
{	
	{
		forceHighQuality
		map	lights/biground1.tga
		colored
		zeroClamp
	}
}

lights/biground1_snd_spectrum
{
	spectrum 1	
	{
		forceHighQuality
		map	lights/biground1.tga
		red 		sound * Parm0
		green 		sound * Parm1
		blue 		sound * Parm2
		zeroClamp
	}
}

lights/biground1_global
{	
	{
		forceHighQuality
		map	lights/biground1.tga
		colored
		red		parm0 * global0
		green	parm1 * global0
		blue	parm2 * global0
		zeroClamp
	}
}

lights/biground1_blamplight_cv
{	
{
		forceHighQuality
		map	lights/biground1.tga
		colored
		zeroClamp
                red     ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm0
                green   ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm1
                blue    ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm2

	}
}

lights/biground1_parmsndflicker
{	
	{
		if ( parm7 == 0 )
		forceHighQuality
		map	lights/biground1.tga
		colored
		zeroClamp
	}

	{
		if ( parm7 != 0 )
		forceHighQuality
		map	lights/biground1.tga
		red 		sound * Parm0
		green 		sound * Parm1
		blue 		sound * Parm2
		zeroClamp
	}
}

lights/flashlight4eric
{
	{
		forceHighQuality
		map	lights/flashlight4eric.tga
		
		zeroClamp
		//colored
		//rgb		eyestable[ time * .05 ] 
	}
}


lights/grate8
{	
	{
		forceHighQuality
		map	lights/grate8.tga
		colored
		zeroClamp
	}
}

lights/grate8sqr
{	
	{
		forceHighQuality
		map	lights/grate8sqr.tga
		colored
		zeroClamp
	}
}

lights/grate8sqr_blinky
{	
	{
		forceHighQuality
		map	lights/grate8sqr.tga
		colored
		red 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm0
		green 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm1
		blue 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm2
		zeroClamp
	}
}

lights/grate7
{	
	{
		forceHighQuality
		map	lights/grate7.tga
		colored
		zeroClamp
	}
}

lights/grate7_blinky
{	
	{
		forceHighQuality
		map	lights/grate7.tga
		colored
		red 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm0
		green 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm1
		blue 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm2
		zeroClamp
	}
}

lights/cavsolarlight
{	
	{
		forceHighQuality
		map	lights/cavsolarlight.tga
		colored
		zeroClamp
	}
}



lights/hellgate1_colorme
{	

	{
		forceHighQuality
		map	lights/hellgate1_colorme.tga
		red			fireballtable[ time * .04 ] * Parm0 
		green		fireballtable[ time * .04 ] * Parm1 
		blue		fireballtable[ time * .04 ] * Parm2
	    rotate	time * .05
		zeroClamp
	}

}


lights/hellgate1
{	

	{
		forceHighQuality
		map	lights/hellgate1.tga
		colored
	    rotate	time * .05
		zeroClamp
		rgb		fireballtable[ time * .04 ]
	}

}


lights/vivlight
{	

	{
		forceHighQuality
		map	lights/vivlight.tga
		colored
		zeroClamp
	}

}


lights/fullambient
{
	ambientLight
	lightFalloffImage	makeintensity( lights/squarelight1c.tga )
	{
		forceHighQuality
		map lights/fullambient.tga
		colored
		zeroClamp
	}
}

lights/grate6
{	

	{
		forceHighQuality
		map	lights/grate6.tga
		colored
		zeroClamp
	}
}

lights/triangle2
{	
	{
		forceHighQuality
		map	lights/triangle1.tga
		red			blamptable[ time * 5 ] * Parm0 
		green		blamptable[ time * 5 ] * Parm1 
		blue		blamptable[ time * 5 ] * Parm2
		zeroClamp
	}
}

lights/triangle1
{	

	{
		forceHighQuality
		map	lights/triangle1.tga
		colored
		zeroClamp
	}
}


lights/mch
{	

	{
		forceHighQuality
		map	lights/mch.tga
		colored
		zeroClamp
	}
}

lights/rred
{	

	{
		forceHighQuality
		map	lights/rred.tga
		colored
		zeroClamp
	}
}

lights/pentflame
{	

	{
		forceHighQuality
		map	lights/pentflame.tga
		colored
		rotate	time * .2
		zeroClamp
	}
}

lights/pentagram
{	
	qer_editorimage textures/decals/pentagramfx.tga
	{
		forceHighQuality
		map	textures/decals/pentagramfx.tga
		colored

		zeroClamp
	}
}


lights/strobevent01
{	
	{
		forceHighQuality
		map	lights/strobevent01.tga 
		colored
		rgb		strobetable[ time * 2 ]
		zeroClamp
	}
}


lights/impflash
{
	noShadows
	{
		forceHighQuality		
		map lights/impflash.tga
		zeroClamp
		rotate	time * 3.7
		rgb		flickerblink[ time * 1 ]
		colored
	}
}

lights/redspawnflash
{
	noShadows
	{
		forceHighQuality		
		map lights/redspawnflash.tga
		zeroClamp
		rotate	time * 3.7
		colored
		//rgb		flickerblink[ time * 1 ]
	}
}

lights/spectrumspawn30
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	spectrum 30
	{
		forceHighQuality
		map lights/squarelight1.tga
		colored
		zeroClamp
	}
}

lights/spectrumspawn31
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	spectrum 31
	{
		forceHighQuality
		map lights/squarelight1.tga
		colored
		zeroClamp
	}
}


lights/spawnflash
{
	{
		forceHighQuality		
		map lights/spawnflash.tga
		zeroClamp
		rotate	time * 3.7
		colored
		//rgb		flickerblink[ time * 1 ]
	}
}


lights/baronflash
{
	{
		forceHighQuality		
		map lights/baronflash.tga
		zeroClamp
		rotate	time * 3.7
		colored
		//rgb		flickerblink[ time * 1 ]
	}
}

lights/flashlight4
{
	{
		forceHighQuality
		map	lights/flashlight4.tga
		
		zeroClamp
		//colored
		//rgb		eyestable[ time * .05 ] 
	}
}


lights/defaultPointLight
{
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )	// this will also be the falloff for any
																	// point light shaders that don't specify one
	{
		forceHighQuality
		map lights/squarelight1.tga
		colored
		zeroClamp
	}
}

lights/default3DLight		// just for research
{
	{
		forceHighQuality
		map _cubicLight
		colored
		zeroClamp
	}
}

lights/desertambientlight
{
	ambientLight
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	{
		forceHighQuality
		map lights/squarelight.tga
		red 	( deserttable [Parm4 + (time * 0.1)]) * Parm0
		green 	( deserttable [Parm4 + (time * 0.1)]) * Parm1
		blue 	( deserttable [Parm4 + (time * 0.1)]) * Parm2	
		zeroClamp
	}
}

lights/desertlight2
{
	{
		forceHighQuality
		map	lights/desertlight.tga
		colored
		rotate	( time * parm3)
		zeroClamp
	}
}

lights/desertlight
{
	{
		forceHighQuality
		map	lights/desertlight.tga
		red 	( deserttable [Parm4 + (time * 0.1) ]) * Parm0
		green 	( deserttable [Parm4 + (time * 0.1) ]) * Parm1
		blue 	( deserttable [Parm4 + (time * 0.1) ]) * Parm2	
		rotate	( time * 0.25 )
		zeroClamp
	}
}

lights/defaultProjectedLight
{
	lightFalloffImage	_noFalloff		// by default, stay bright almost all the way to the end
	{
		forceHighQuality
		map lights/squarelight1.tga
		colored
		zeroClamp
	}
}


// an ambient light will do non-directional bump mapping, and won't have specular lighting
// or shadows
lights/ambientLight
{
	ambientLight
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	{
		forceHighQuality
		map lights/squarelight1.tga
		colored
		zeroClamp
	}
}


lights/ambientLight2
{
	ambientLight
	lightFalloffImage	makeintensity( lights/squarelight1a.tga )
	{
		forceHighQuality
		map lights/squarelight.tga
		colored
		zeroClamp
	}
}


//parm 3=flicker speed	parm 4=offset

lights/nofalloff
{
	{
		forceHighQuality
		map	lights/nofalloff.tga
		colored
		zeroClamp
	}
}

lights/qcfloorvent01x
{
	{
		forceHighQuality
		map	lights/qcfloorvent01x.tga
		colored
		rgb		eyestable[ time * 1 ]
		zeroClamp
	}
}



lights/roundfire
{
	{
		forceHighQuality
		map	lights/roundfire.tga
		red 	( firetable [Parm4 + (time / 6 * (Parm3)) ]) * Parm0
		green 	( firetable [Parm4 + (time / 6 * (Parm3)) ]) * Parm1
		blue 	( firetable [Parm4 + (time / 6 * (Parm3)) ]) * Parm2
		rotate	firelightrot [ time * 2 ]
		zeroClamp
	}
}

lights/floorpgrate
{
	{
		forceHighQuality
		map	lights/floorpgrate.tga
		colored
		zeroClamp
		
	}
}

lights/qc_comj
{
	{
		forceHighQuality
		map	lights/qc_comj.tga
		colored
		rgb		eyestable[ time * 1.1 ]
		zeroClamp
		rotate	time * 0.2
	}
}



lights/blamplight2
{	
	{
		forceHighQuality
		//map	makeintensity( lights/blamplight2.tga )
		map	lights/blamplight2.tga 
		colored
		rgb		bathroomtable[ time *.3 ]
		zeroClamp
	}
}


lights/killtest
{
	{
		if ( parm6 == 1 )
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * (Parm0 * acceleratorfade [ time / 7 ] ) )
		green 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * (Parm1 * acceleratorfade [ time / 7 ] ) )
		blue 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * (Parm2 * acceleratorfade [ time / 7 ] ) )
		zeroclamp
	}
	{
		if ( parm6 == 0 )
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm0 )
		green 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm1 )
		blue 		( ( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm2 )
		zeroclamp
	}
}

lights/floorvent01x_cv
{
	{
		forceHighQuality
		map	lights/floorvent01x_cv.tga
		colored
		red 		( flickerblink [Parm4 + (time * (1 * Parm3)) ]) * Parm0
		green 		( flickerblink [Parm4 + (time * (1 * Parm3)) ]) * Parm1
		blue 		( flickerblink [Parm4 + (time * (1 * Parm3)) ]) * Parm2
		//rgb		eyestable[ time * 1 ]
		zeroClamp
	}
}

lights/fanlightgrateSC
{
	{
		forceHighQuality
		if ( global0 == 0 )
		map		lights/fangrate.tga
		colored
		zeroclamp
	}
	{
		forceHighQuality
		if ( global0 == 0 )
		map	lights/fanblade.tga
		colored
		zeroclamp
		rotate	time * -1
	}
	{
		if ( global0 != 0 )
		forceHighQuality
		map		lights/fangrate.tga
		red	( Parm0 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		green	( Parm1 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		blue	( Parm2 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		zeroclamp
	}
	{
		if ( global0 != 0 )
		forceHighQuality
		map	lights/fanblade.tga
		red	( Parm0 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		green	( Parm1 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		blue	( Parm2 * acceleratorflashtable2[ ( time - global1 ) / 7 ] )
		zeroclamp
		rotate	time * -1
	}
}

lights/fanblade3
{
	{
		forceHighQuality
		map		lights/fanblade3.tga
		colored
		zeroclamp
		rotate	(time * -1) * Parm3 + Parm4
	}
}

lights/fanlightgrate
{
	{
		forceHighQuality
		map		lights/fanblade.tga
		colored
		zeroclamp
		rotate	time * -1
	}
	{
		forceHighQuality
		map		lights/fangrate.tga
		colored
		zeroclamp
	}
}

lights/square_blast
{
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm0
		green 		( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm1
		blue 		( blasttable [Parm4 + (time / 6 * (Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/square_strobe
{
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm0
		green 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm1
		blue 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/square_brokenneon2
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm0
		green 		( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm1
		blue 		( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/square_brokenneon1
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm0
		green 		( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm1
		blue 		( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/square_flicker2
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm0
		green 		( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm1
		blue 		( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/square_flicker
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm0
		green 		((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm1
		blue 		((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm2
		zeroclamp
	}
}

lights/square_flicker3
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm0
		green 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm1
		blue 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm2
		zeroclamp
	}
}

lights/square_flicker3_spectrum
{	
	spectrum 1
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm0
		green 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm1
		blue 		((.25 * blinktable3 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm2
		zeroclamp
	}
}

lights/square_flicker4
{	
	{
		forceHighQuality
		map		lights/squarelight1.tga
		red 		((.25 * blinktable4 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm0
		green 		((.25 * blinktable4 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm1
		blue 		((.25 * blinktable4 [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm2
		zeroclamp
	}
}

lights/round_sin
{	
	{
		forceHighQuality
		map			lights/round.tga
		red 		( sintable [Parm4 + (time * Parm3)] ) * Parm0
		green 		( sintable [Parm4 + (time * Parm3)] ) * Parm1
		blue 		( sintable [Parm4 + (time * Parm3)] ) * Parm2
		zeroclamp
	}
}

lights/round_strobe
{	
	{
		forceHighQuality
		map		lights/round.tga
		red 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm0
		green 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm1
		blue 		( blinktable2 [Parm4 + (time * (6 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/round_brokenneon2
{	
	{
		forceHighQuality
		map		lights/round.tga
		red 		( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm0
		green 	( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm1
		blue 		( neontable2 [Parm4 + (time * (.15 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/round_brokenneon1
{	
	{
		forceHighQuality
		map		lights/round.tga
		red 		( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm0
		green 	( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm1
		blue 		( neontable1 [Parm4 + (time * (.2 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/round_flicker2
{	
	{
		forceHighQuality
		map		lights/round.tga
		red 		( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm0
		green 	( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm1
		blue 		( flashtable [Parm4 + (time * (.25 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/round_flicker
{	
	{
		forceHighQuality
		map		lights/round.tga
		red 		((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm0
		green 	((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm1
		blue 		((.25 * blinktable [Parm4 + (time * (15 * Parm3)) ]) +.75) * Parm2
		zeroclamp
	}
}

lights/mlight01

{
	{
		forceHighQuality
		map	lights/mlight01.tga
		colored
		zeroClamp
	}
}

lights/blur_cv
{
	{
		forceHighQuality
		map	lights/blur_cv.tga
		zeroClamp
		colored
	}
}


lights/blamplight_cv
{
	{
		forceHighQuality
		map	lights/blamplight_cv.tga
		zeroClamp
		colored
		red 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm0
		green 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm1
		blue 	((.1 * sintable [.15 + (time * 12) ]) +.9) * Parm2
	}
}

lights/blamplight_still_cv
{
	{
		forceHighQuality
		map	lights/blamplight_cv.tga
		zeroClamp
		colored
	}
}

lights/xblamplight_cv
{
	{
		forceHighQuality
		map	lights/blamplight_cv.tga
		colored
		zeroClamp
                red     ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm0
                green   ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm1
                blue    ((.1 * sintable [(time * ( 12 + Parm3 ) ) ]) +.9) * Parm2

	}
}

lights/duolight02_cv
{
	{
		forceHighQuality
		map	lights/duolight02grey.tga
		colored

		red 	( neontable1 [Parm4 + (time * (1 * Parm3)) ]) * Parm0 * sound
		green 	( neontable1 [Parm4 + (time * (1 * Parm3)) ]) * Parm1 * sound
		blue 	( neontable1 [Parm4 + (time * (1 * Parm3)) ]) * Parm2 * sound

//		red 	neontable1 [ time * 1 ] * Parm0
//		green 	neontable1 [ time * 1 ] * Parm1
//		blue 	neontable1 [ time * 1 ] * Parm2

		//zeroClamp
	}
}


lights/bspot01_cv
{
	{
		forceHighQuality
		map	lights/bspot01_cv.tga
		zeroClamp
		colored
		red 	blighttable [ time * .2 ] * Parm0
		green 	blighttable [ time * .2 ] * Parm1
		blue 	blighttable [ time * .2 ] * Parm2
	}
}

lights/xbspot01_cv
{
	{
		forceHighQuality
		map	lights/bspot01_cv.tga
		zeroClamp
		colored
		red 	blighttable [ (time * .2) + Parm3 ] * Parm0
		green 	blighttable [ (time * .2) + Parm3 ] * Parm1
		blue 	blighttable [ (time * .2) + Parm3 ] * Parm2
	}
}

lights/square
{
	{
		forceHighQuality
		map	lights/squarelight1.tga
		colored
		zeroclamp
		
	}
}

lights/rotate
{

	{
		forceHighQuality
		map	lights/rotate3.tga
		colored
		rotate	time * 1
		zeroClamp
	}
	{
		forceHighQuality
		map	lights/rotate3.tga
		colored
		rotate	time * 1.6
		zeroClamp
	}

}

lights/hangar_rotate
{

	{
		forceHighQuality
		map	lights/rotate3.tga
		colored
		rotate	time * 1
		zeroClamp
	}

}

lights/bspot01
{
	{
		forceHighQuality
		map	lights/bspot01.tga
		zeroClamp
		colored
                rgb		blighttable[ time * .2 ]
	}
}

lights/spot01_dblbright
{
	{
		forceHighQuality
		map	lights/spot01.tga
		colored
		zeroClamp
		
	}
	{
		forceHighQuality
		map	lights/spot01.tga
		colored
		zeroClamp
		
	}
}

lights/spot01
{
	{
		forceHighQuality
		map	lights/spot01.tga
		colored
		zeroClamp
		
	}
}

lights/spot01_global
// uses global parms
{
	{
		forceHighQuality
		map	lights/spot01.tga
		red		parm0 * global0
		green	parm1 * global1
		blue	parm2 * global2
		zeroClamp
	}
}

lights/flash
{
	{
		forceHighQuality
		map	lights/light.tga
		rgb		flashtable[ time ]
		zeroClamp
	}
}

lights/onewaydown
{	//falloff only goes in one direction.  should get rid of this once planar lights are implemented.
	{
		forceHighQuality
		map	makeintensity( lights/onewaydown.tga )
		zeroClamp
	}
}

lights/oneway
{	//falloff only goes in one direction.  should get rid of this once planar lights are implemented.
	{
		forceHighQuality
		map	makeintensity( lights/oneway.tga )
		zeroClamp
	}
}

lights/blinds02
{
	{
		forceHighQuality
		map	lights/blinds02.tga
		colored
		rgb		eyestable[ time * .01 ]
		zeroClamp
	}
}

lights/duolight02
{
	{
		forceHighQuality
		map	lights/duolight01.tga
		colored
		//red		(neontable1[ time * 3 ])  * parm0
		//green	(neontable1[ time * 3 ])  * parm1
		//blue	(neontable1[ time * 3 ])  * parm2
		zeroClamp					    
	}								    
}


lights/duolight01
{
	{
		forceHighQuality
		map	lights/duolight01.tga
		red		eyestable[ time * .01 ]
		green  	eyestable[ time * .01 ]
		blue   	eyestable[ time * .01 ]
		zeroClamp
	}
}

lights/blamplight_tile4
{	
	{
		forceHighQuality
		map	lights/blamplighttile.tga 
		red		blamptable[ time * .5 ] * parm0
		green	blamptable[ time * .5 ] * parm1
		blue	blamptable[ time * .5 ] * parm2
		zeroClamp
	}
}

lights/blamplight
{	
	{
		forceHighQuality
		//map	makeintensity( lights/blamplight.tga )
		map	lights/blamplight.tga 
		colored
		rgb		blamptable[ time * 5 ]
		zeroClamp
	}
}

lights/blamplighte3
{	
	{

		forceHighQuality		
		map	lights/blamplighte3.tga 
		colored
		rgb		bathroom2table[ time * 1 ]
		zeroClamp
	}
}

lights/triangle
{	
	{
		forceHighQuality
		map	makeintensity( lights/triangle.tga )
		colored
		zeroClamp
	}
}

lights/squarelight_split
{	
	{
		forceHighQuality
		map	makeintensity( lights/squarelight_split.tga )
		colored
		zeroClamp
	}
}

lights/squarelight1a
{	
	{
		forceHighQuality
		map	makeintensity( lights/squarelight1a.tga )
		colored
		zeroClamp
	}
}

lights/mars_light
{
	{
		forceHighQuality
		map	lights/mars.tga
		colored
		rgb		eyestable[ time * 1 ]
		zeroClamp
	}
}

lights/brucedemo2
{
	{
		forceHighQuality
		map	lights/grate5.tga
		colored
		rgb		eyestable[ time * 3 ]
		zeroClamp
	}
}

lights/brucedemo1
{
	{
		forceHighQuality
		map	lights/crap02.tga
		colored
		//rgb		blinktable[ time * 1.6 ]
		zeroClamp
	}
}


lights/floorvent01blue
{
	{
		forceHighQuality
		map	lights/floorvent01blue.tga
		colored
		rgb		eyestable[ time * .8 ]
		zeroClamp
	}
}

lights/floorvent01int
{
	{
		forceHighQuality
		map	lights/floorvent01int.tga
		colored
		rgb		eyestable[ time * 1.1 ]
		zeroClamp
	}
}

lights/sarge_talk

{
	{
		forceHighQuality
		map	lights/grate5.tga
		colored
		//scroll time * .8 , time * .3
		rotate	time * 1.1
		rgb		firetable[ time * .5 ]
		zeroClamp
	}
}

lights/jethro_spot1

{
	{
		forceHighQuality
		map	lights/grate5.tga
		colored
		rotate	time * .05
		zeroClamp
	}
}

lights/floorvent02
{
	{
		forceHighQuality
		map	lights/floorvent01.tga
		colored
		rotate	time * .2
		zeroClamp
	}
}

lights/sarge_spot1
{
	{
		forceHighQuality
		map	lights/floorvent01.tga
		colored
		rgb		sargetable1[ time * .05 ]
		//translate time *.2, time * 7
		rotate	time * .2
		zeroClamp
	}
}

lights/sarge_spot2
{
	{
		forceHighQuality
		map	lights/flashlight.tga
		colored
		rgb		sargetable2[ time * .05 ]
		rotate	time * .01
		zeroClamp
	}
}

lights/sarge_spot3
{
	{
		forceHighQuality
		map	lights/crap01.tga
		colored
		rgb		sargetable3[ time * .05 ]
		rotate	time * 2
		zeroClamp
	}
}

lights/grate4
{
	{
		forceHighQuality
		map	lights/grate4.tga
		colored
		rgb		eyestable[ time * .1 ]
		zeroClamp
	}
}

lights/floorvent01
{
	{
		forceHighQuality
		map	lights/floorvent01.tga
		colored
		rgb		eyestable[ time * 1 ]
		zeroClamp
	}
}

lights/floorvent01x
{
	{
		forceHighQuality
		map	lights/floorvent01x.tga
		colored
		rgb		eyestable[ time * 1 ]
		zeroClamp
	}
}



lights/crap01
{
	{
		forceHighQuality
		map	lights/crap01.tga
		colored
		rgb		eyestable[ time * .1 ]
		zeroclamp
	}
}



lights/senescrollight
{
	{
		forceHighQuality
		//slowpass
		map	lights/senescrollight.tga
		translate		( senescrollightable [Parm4 + (time * (0.1 * Parm3)) ]) , 0
		red 		( senescrollightableA [Parm4 + (time * (0.1 * Parm3)) ]) * Parm0
		green		( senescrollightableA [Parm4 + (time * (0.1 * Parm3)) ]) * Parm1
		blue		( senescrollightableA [Parm4 + (time * (0.1 * Parm3)) ]) * Parm2

		zeroclamp
	}
	{
		forceHighQuality
		//fastpass
		map	lights/senescrollight.tga
		translate		( senescrollightable [Parm4 + (time * (2 * Parm3)) ]) , 0
		red 		( senescrollightableA [Parm4 + (time * (2 * Parm3)) ]) * Parm0
		green		( senescrollightableA [Parm4 + (time * (2 * Parm3)) ]) * Parm1
		blue		( senescrollightableA [Parm4 + (time * (2 * Parm3)) ]) * Parm2
		zeroclamp
	}
}

lights/squarelight1blue
{
	{
		forceHighQuality
		map	lights/squarelight1blue.tga
		zeroclamp
	}
}

lights/squarelight2a
{
	{
		forceHighQuality
		map	lights/squarelight2.tga
		rgb		flashtable[ time ]
		zeroclamp
	}
}

lights/squarelight2
{
	{
		forceHighQuality
		map	lights/squarelight2.tga
//		rgb		flashtable[ time ]
		zeroclamp
	}
}

lights/twopass
{
	{
		forceHighQuality
		map	lights/squarelight1.tga
		colored
		zeroclamp
	}
	{
		forceHighQuality
		map	lights/inverse.tga
		colored
		zeroclamp
	}
}

lights/squarelight1sky
{
	lightFalloffImage	makeintensity( lights/squarelight1b.tga )
	{
		forceHighQuality
		map	lights/squarelight1.tga
		colored
		zeroclamp
	}
}

lights/squarelight1_dblbright
{
	{
		forceHighQuality
		map	lights/squarelight1.tga
		colored
		zeroclamp
	}
	{
		forceHighQuality
		map	lights/squarelight1.tga
		colored
		zeroclamp
	}

}

lights/squarelight1
{
	{
		forceHighQuality		
		map	lights/squarelight1.tga
		colored
		zeroclamp
		
	}
}

lights/squarelight1_cave_group1
{
	{
		forceHighQuality	
		map	lights/squarelight1.tga
		red			parm0 * global0
		green		parm1 * global0
		blue		parm2 * global0
		zeroclamp
	}
}

lights/squarelight1_cave_group2
{
	{
		forceHighQuality
		map	lights/squarelight1.tga
		red			parm0 * global1
		green		parm1 * global1
		blue		parm2 * global1
		zeroclamp
	}
}

lights/squarelight1_cave_group3
{
	{
		forceHighQuality
		map	lights/squarelight1.tga
		red			parm0 * global2
		green		parm1 * global2
		blue		parm2 * global2
		zeroclamp
	}
}

lights/xray02
{
	{
		forceHighQuality
		map			lights/asstemp2a.tga
//		translate	time * .1, time * .01
//		colored
		red			Parm0 * xray02table[ time * .1 ]
		green		Parm1 * xray02table[ time * .1 ]
		blue		Parm2 * xray02table[ time * .1 ]
		zeroclamp
	}
}

lights/flashlight3
{
	{
		forceHighQuality
		map	lights/flashlight3.tga
		zeroClamp
		colored
                rotate	time * .01
	}
}

lights/flashlight3blue
{
	{
		forceHighQuality
		map	lights/flashlight3blue.tga
		zeroClamp
		colored
                rotate	time * .01
	}
}	

lights/grate3
{
	{
		forceHighQuality
		map lights/grate3.tga
		zeroclamp
		colored
	}
}

lights/grate3x
{
	{
		forceHighQuality
		map lights/grate3x.tga
		zeroclamp
		colored
	}
}


lights/bluetex2xlight
{
	{
		forceHighQuality
		map lights/bluetex2xlight.tga
		zeroclamp
		colored
	}
}

lights/rspot01drk
{
	{
		forceHighQuality
		map	lights/spot01drk.tga
		zeroClamp
		colored
        rotate	time * .5
	}
}

lights/xray01
{
	{
		forceHighQuality
		map	lights/xray01.tga
		zeroClamp
		colored
		rotate	time * 1
	}
	{
		forceHighQuality
		map	lights/xray01.tga
		zeroClamp
		colored
		rotate	time * -3
	}
}

lights/spot08
{
	{
		forceHighQuality
		map	lights/spot08.tga
		zeroClamp
		colored
	}
}

lights/blur
{
	{
		forceHighQuality
		map	lights/blur.tga
		zeroClamp
		colored
	}
}

lights/blur2
{
	{
		forceHighQuality
		map	lights/blur2.tga
		zeroClamp
		colored
	}
}

lights/flashlight
{
	{
		forceHighQuality
		map	lights/flashlight.tga
		
		zeroClamp
		colored
	}
}

lights/flashlight2
{
	{
		forceHighQuality
		map	lights/flashlight2.tga
		zeroClamp
		colored
	}
}

lights/spot01drk
{
	{
		forceHighQuality
		map	lights/spot01drk.tga
		zeroClamp
		colored
	}
}

lights/spot02
{
	{
		forceHighQuality
		map	lights/spot02.tga
		zeroClamp
		colored
	}
}

lights/stainedglass
{
	{
		forceHighQuality
		map	lights/stainedglass3.tga
		zeroClamp
		colored
	}
}

lights/redlight01
{
	{
		forceHighQuality
		map	lights/redcircuit.tga
		zeroClamp
	}
}

lights/spotlight04
{
	{
		forceHighQuality
		map	lights/spot04.tga
		zeroClamp
		colored
	}
}

lights/blurlight3
{
	{
		forceHighQuality
		map	lights/blur3.tga
		zeroClamp
		colored
	}
}

light5
{
	{
		forceHighQuality
		map	textures\sfx\black_2
		zeroClamp
		colored 
	}
}

lightspectrum
{
	{
		forceHighQuality
		map	textures\sfx\black_2
		zeroClamp
		colored 
	}
}


_spotlight
{
	{
		forceHighQuality
		map	_spotlight
		zeroClamp
		colored 
	}
}

_pointLight1
{
	{
		forceHighQuality
		map	_pointLight1
		zeroClamp
		colored 
	}
}

_pointLight2
{
	{
		forceHighQuality
		map	_pointLight2
		zeroClamp
		colored 
	}
}

_pointLight3
{
	{
		forceHighQuality
		map	_pointLight3
		zeroClamp
		colored 
	}
}

lights/windowLight
{
	{
		forceHighQuality
		map	lights/window
		zeroClamp
	}
}


lights/rotatingLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		rotate	time * 0.05
	}
}

lights/swingingLight
{
	{
		forceHighQuality
		map	lights/spot05
		//zeroClamp
		colored
		rotate	time * 3
		scale	speaker_1[ time ] *0.75 + 0.25, speaker_1[ time ] *0.75 + 0.25
		zeroClamp
	}
}

lights/scalingLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		scale	scaleTable[time] * 0.25 + 0.75, scaleTable[time] * 0.25 + 0.75
	}
}

lights/scaleRotateLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		scale	scaleTable[time], 2
		rotate	time * 0.2
	}
}

lights/rotateScaleLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		rotate	time * 0.2
		scale	scaleTable[time], 2
	}
}


table shearTable { { -1, 0, 1, 0 } }

lights/shearingLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		// shrink it down so we can distort it without
		// going out of bounds
		scale	2, 2
		rotate	time * 0.2
		// now shear it side to side
		shear	shearTable[time] * 0.5, 0
	}
}

lights/translatingLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored

		// there is enough border in the texture to let us move it this small
		// amount without needing a downscale

		// use two different scale values so the period of jitter doesn't seem so short
		translate	0.05 * scaleTable[time], 0.05 * scaleTable[time*0.7]
	}
}


table calRedTable { { 1, 0, 0 } }
table calGreenTable { { 0, 1, 0 } }
table calBlueTable { { 0, 0, 1 } }

lights/colorAnimatingLight
{
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		red		calRedTable[time*0.5]
		green	calGreenTable[time*0.5]
		blue	calBlueTable[time*0.5]
	}
}


lights/doubleLight
{
	{
		forceHighQuality
		map	lights/spot07
		zeroClamp
		colored
		rotate	time * 0.05
	}
	{
		forceHighQuality
		map	lights/spot05
		zeroClamp
		colored
		scale	2, 2
		shear	shearTable[time] * 2, 0
		rotate	time * -0.05
	}
}


lights/squarelight
{
	{
		forceHighQuality
		map	lights/squarelight.tga
		zeroClamp
		colored
	}
}


lights/testFalloff
{	// this is just a double bump for demonstrating custom falloffs
	{
		forceHighQuality
		map	makeintensity( lights/testFalloff.tga )
		zeroClamp
	}
}

lights/xfalloff
{
	// xian's pointlight falloff thingy
	{
		forceHighQuality
		map makeintensity (lights/xfalloff.tga)
		colored
		zeroClamp
	}
}

lights/xambient
{
	// xian's ambient texture volume thingy
	{
		forceHighQuality
		map makeintensity (lights/xambient.tga)
		zeroClamp
		colored
	}
}

lights/malsrotatedLight
{
	{
		forceHighQuality
		map makeintensity (lights/squarelight1a.tga)
		rotate	parm3
		zeroClamp
		colored
	}
}

lights/globalFadeLight
{	
	// script can change the global parms to effect the color
	// of every single light in the world that uses this shader
	{
		forceHighQuality
		map lights/squarelight1.tga
		red		parm0 * global0
		green	parm1 * global0
		blue	parm2 * global0
		zeroClamp
	}
}

lights/globalFadeLight2
{	
	// script can change the global parms to effect the color
	// of every single light in the world that uses this shader
	{
		forceHighQuality
		map lights/squarelight1.tga
		red		parm0 * global1
		green	parm1 * global1
		blue	parm2 * global1
		zeroClamp
	}
}


lights/duffysquarelight
{
	{
		forceHighQuality
		map	lights/squarelight.tga
		zeroClamp
		red 	( 0.75 + ( 0.25 * sound ) ) * Parm0
		green 	0
		blue 	0

	}
}

lights/xianspecial
{	
	
	{if  ( (time + parm4) * Parm3 < 1.0 )
		forceHighQuality	
		map	lights/squareishlight.tga
		red		blinktable[ (time + parm4) * Parm3 ] * Parm0
		green	blinktable[ (time + parm4) * Parm3 ] * Parm1
		blue	blinktable[ (time + parm4) * Parm3 ] * Parm2
		zeroClamp
	}
	{if  ( (time + parm4) * Parm3 >= 1.0 )
		forceHighQuality
		map	lights/squareishlight.tga
		red		xianjittertable[ (time + parm4) * Parm3 - 1.0] * Parm0
		green	xianjittertable[ (time + parm4) * Parm3 - 1.0] * Parm1
		blue	xianjittertable[ (time + parm4) * Parm3 - 1.0] * Parm2
		zeroClamp
	}
}

lights/xianspecial_stages
{	
	{if ( parm7 == 0 )
		forceHighQuality
		map	lights/squareishlight.tga
		red		xianjittertable_low[ (time + parm4) * Parm3 ] * Parm0
		green	xianjittertable_low[ (time + parm4) * Parm3 ] * Parm1
		blue	xianjittertable_low[ (time + parm4) * Parm3 ] * Parm2
		zeroClamp
	}

	{if ( parm7 == 1)
		forceHighQuality
		map	lights/squareishlight.tga
		red		blinktable[ (time + parm4) * Parm3 ] * Parm0
		green	blinktable[ (time + parm4) * Parm3 ] * Parm1
		blue	blinktable[ (time + parm4) * Parm3 ] * Parm2
		zeroClamp
	}
	{if  ( (time + parm4) * Parm3 >= 1.0 )
		forceHighQuality
		map	lights/squareishlight.tga
		red		xianjittertable_hi[ (time + parm4) * Parm3 - 1.0] * Parm0
		green	xianjittertable_hi[ (time + parm4) * Parm3 - 1.0] * Parm1
		blue	xianjittertable_hi[ (time + parm4) * Parm3 - 1.0] * Parm2
		zeroClamp
	}
}

lights/medical_laserb
{
	{
		forceHighQuality
		map	lights/medicallaserb.tga
		//translate	time * 0 , time *0.05
		
		
	}
}

lights/medical_laser
{
	{
		forceHighQuality
		map	lights/medicallaser.tga
		rotate	time *-0.035
		zeroClamp
		colored
	}
}
