//****************************************************************\\
//	- LunBase Master Shader - Feel free to modify and steal -	\\
//	- Be sure to rename everything you use - or else -		\\
//****************************************************************\\

textures/lunbase/pillar1_7
{
	q3map_lightimage textures/lunbase/pillar1_7glow.tga
	q3map_surfacelight 550
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/pillar1_7.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/pillar1_7glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/pillar2_4
{
	q3map_lightimage textures/lunbase/pillar2_4glow.tga
	q3map_surfacelight 550
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/pillar2_4.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/pillar2_4glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport3
{
	q3map_surfacelight 1250
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport3.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport3dim
{
	qer_editorimage textures/lunbase/onyxsupport3.tga
	q3map_surfacelight 700
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport3.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport3brite
{
	qer_editorimage textures/lunbase/onyxsupport3.tga
	q3map_surfacelight 2500
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport3.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport5
{
	q3map_surfacelight 1250
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport5.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport5dim
{
	qer_editorimage textures/lunbase/onyxsupport5.tga
	q3map_surfacelight 700
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport5.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxsupport5brite
{
	qer_editorimage textures/lunbase/onyxsupport5.tga
	q3map_surfacelight 2500
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/lunbase/onyxsupport5.tga
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxsupport3glow.tga
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/jaildrblue
{
	surfaceparm nodlight
	surfaceparm nolightmap
	surfaceparm nomarks
	q3map_lightimage textures/lunbase/jaildrpulse1.tga
	q3map_surfacelight 900
	q3map_lightsubdivide 32
	{
		map textures/lunbase/jaildr.tga
		rgbGen identity
	}
	{
		map textures/lunbase/jaildrglow.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave inversesawtooth 0.5 0.5 0 0.5
	}
}

textures/lunbase/jaildrwhite
{
	surfaceparm nodlight
	surfaceparm nolightmap
	surfaceparm nomarks
	q3map_surfacelight 1250
	q3map_lightsubdivide 32
	{
		map textures/lunbase/jaildrwhite.tga
		rgbGen identity
	}
	{
		map textures/lunbase/jaildrwhiteglow.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave inversesawtooth 0.5 0.5 0 0.5
	}
}

textures/lunbase/teleport
{
	surfaceparm nodlight
	surfaceparm nolightmap
	surfaceparm trans
	surfaceparm noimpact
	surfaceparm nonsolid
	q3map_surfacelight 750
	tesssize 64
	{
		map textures/lunbase/teleport.tga
		tcMod scroll -0.02 0.5
		tcMod turb 0 .12 0 0.333
	}
	{
		map textures/lunbase/teleport.tga
		tcMod scroll 0.01 -0.5
		tcMod turb 0 .12 0 0.333
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/tekfloor1
{
	surfaceparm	metalsteps
	{
		map textures/lunbase/tekfloor1glow.tga
		tcMod scale 0.5 0.5
		tcMod scroll 1 0
	}
	{
		map textures/lunbase/tekfloor1.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/tekfloor2
{
	surfaceparm	metalsteps
	{
		map textures/lunbase/tekfloor1glow.tga
		tcMod scale 0.5 0.5
		tcMod scroll 1 0
	}
	{
		map textures/lunbase/tekfloor2.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/tekfloor3
{
	surfaceparm	metalsteps
	{
		map textures/lunbase/tekfloor1glow.tga
		tcMod scale 0.5 0.5
		tcMod scroll 1 0
	}
	{
		map textures/lunbase/tekfloor3.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/lunaran1
{
	surfaceparm nodlight
	surfaceparm nomarks
	{
		animmap 0.5 textures/lunbase/lunaran2.tga textures/lunbase/lunaran1.tga
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/effects/tinfx2.tga
		blendFunc GL_ONE GL_ONE
		tcGen environment
	}
}

textures/lunbase/bluedepth
{
	surfaceparm nodlight
	q3map_lightimage textures/liquids/kc_fogcloud3.tga
	qer_editorimage textures/sfx/hellfog.tga
	surfaceparm nonsolid
	surfaceparm nolightmap
	surfaceparm trans
	surfaceparm fog
	q3map_surfacelight 50
	fogparms ( 0 .5 1 ) 256
	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale -.05 -.05
		tcmod scroll .01 -.01
		rgbgen identity
	}
	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale .05 .05
		tcmod scroll .01 -.01
		rgbgen identity
	}
}

textures/lunbase/bluedeeper	// Fog with a longer fade distance for the dome room
{
	surfaceparm nodlight
	q3map_lightimage textures/liquids/kc_fogcloud3.tga
	qer_editorimage textures/sfx/hellfog.tga
	surfaceparm nonsolid
	surfaceparm nolightmap
	surfaceparm trans
	surfaceparm fog
	q3map_surfacelight 50
	fogparms ( 0 .5 1 ) 480
	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale -.05 -.05
		tcmod scroll .01 -.01
		rgbgen identity
	}
	{
		map textures/liquids/kc_fogcloud3.tga
		blendfunc gl_dst_color gl_zero
		tcmod scale .05 .05
		tcmod scroll .01 -.01
		rgbgen identity
	}
}

textures/lunbase/jumppad1
{
	surfaceparm	metalsteps
	surfaceparm nodamage
	{
		clampmap textures/lunbase/jumppadring.tga
		tcMod stretch sawtooth 0.25 4.5 0 1.5
		rgbGen identity
	}
	{
		map textures/lunbase/jumppad1.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		clampmap textures/lunbase/jumppadswirl.tga
		tcMod rotate 180
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/jumppad2
{
	surfaceparm	metalsteps
	surfaceparm nodamage
	{
		clampmap textures/lunbase/jumppadring.tga
		tcMod stretch sawtooth 0.25 4.5 0 1.5
		rgbGen identity
	}
	{
		map textures/lunbase/jumppad2.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		clampmap textures/lunbase/jumppadswirl.tga
		tcMod rotate 180
		blendFunc GL_ONE GL_ONE
	}
}

textures/lunbase/onyxtele
{
	q3map_lightimage textures/lunbase/teleport2.tga
	q3map_surfacelight 450
	{
		map textures/lunbase/teleport2.tga
		tcMod scroll -0.02 -1
	}
	{
		map textures/lunbase/onyxtele.tga
		blendFunc GL_ONE GL_SRC_ALPHA
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
	{
		map textures/lunbase/onyxteleglow.tga
		blendFunc GL_ONE GL_ONE
		tcMod scroll 0 -1
	}
}

textures/lunbase/pillar2_1shiny
{
	qer_editorimage textures/lunbase/pillar2_1.tga
	{
		map textures/effects/tinfx2.tga
		tcGen environment
	}
	{
		map textures/lunbase/pillar2_1.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/pillar3_1shiny
{
	qer_editorimage textures/lunbase/pillar3_1.tga
	{
		map textures/effects/tinfx2.tga
		tcGen environment
	}
	{
		map textures/lunbase/pillar3_1.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/pillar3_2shiny
{
	qer_editorimage textures/lunbase/pillar3_2.tga
	{
		map textures/effects/tinfx2.tga
		tcGen environment
	}
	{
		map textures/lunbase/pillar3_2.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/ceil1_lun_10k
{
	surfaceparm nodlight
	q3map_surfacelight 10000
	q3map_lightimage textures/lunbase/ceil1_lunglow.tga
	qer_editorimage textures/lunbase/ceil1_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil1_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil1_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/ceil1_lun_5k
{
	surfaceparm nodlight
	q3map_surfacelight 5000
	q3map_lightimage textures/lunbase/ceil1_lunglow.tga
	qer_editorimage textures/lunbase/ceil1_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil1_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil1_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/ceil1_lun_20k
{
	surfaceparm nodlight
	q3map_surfacelight 20000
	q3map_lightimage textures/lunbase/ceil1_lunglow.tga
	qer_editorimage textures/lunbase/ceil1_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil1_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil1_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/ceil2_lun_10k
{
	surfaceparm nodlight
	q3map_surfacelight 10000
	q3map_lightimage textures/lunbase/ceil2_lunglow.tga
	qer_editorimage textures/lunbase/ceil2_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil2_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil2_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/ceil2_lun_5k
{
	surfaceparm nodlight
	q3map_surfacelight 5000
	q3map_lightimage textures/lunbase/ceil2_lunglow.tga
	qer_editorimage textures/lunbase/ceil2_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil2_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil2_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/ceil2_lun_20k
{
	surfaceparm nodlight
	q3map_surfacelight 20000
	q3map_lightimage textures/lunbase/ceil2_lunglow.tga
	qer_editorimage textures/lunbase/ceil2_lun.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/ceil2_lun.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/ceil2_lunglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/creteold // Heh-heh, right.
{
	{
		map textures/effects/tinfx2.tga
		tcGen environment
	}
	{
		map textures/lunbase/creteold.tga
		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
	}
}

textures/lunbase/onyxlite_2k
{
	surfaceparm nodlight
	q3map_surfacelight 2000
	q3map_lightimage textures/lunbase/onyxliteglow.tga
	qer_editorimage textures/lunbase/onyxlite.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/onyxlite.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/onyxliteglow.tga
		blendFunc GL_ONE GL_ONE		}
}

textures/lunbase/onyxliteblu_2k
{
	surfaceparm nodlight
	q3map_surfacelight 2000
	q3map_lightimage textures/lunbase/onyxlitebluglow.tga
	qer_editorimage textures/lunbase/onyxliteblu.tga
	surfaceparm nomarks
	{	map $lightmap
		rgbGen identity	}
	{	map textures/lunbase/onyxliteblu.tga
		blendFunc GL_DST_COLOR GL_ZERO	}
	{	map textures/lunbase/onyxlitebluglow.tga
		blendFunc GL_ONE GL_ONE		}
}

//Not used - glass looks better
textures/lunbase/grate1
{
//	qer_editorimage textures/lunbase/grate1.tga
	surfaceparm nonsolid
	surfaceparm playerclip
	surfaceparm	metalsteps		
	surfaceparm nomarks
	surfaceparm trans
	{
		map textures/lunbase/grate1.tga
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}

//Quick'n'Dirty metalsteps floor shaders
textures/lunbase/onyx
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/onyx.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/floor1
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/floor1.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/floor2
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/floor2.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/floor3
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/floor3.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/floor4
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/floor4.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/floorb
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/floorb.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/hexfloor1
{	surfaceparm	metalsteps
{	map $lightmap
	rgbGen identity	}
{	map textures/lunbase/hexfloor1.tga
	blendFunc GL_DST_COLOR GL_ZERO	}	}

textures/lunbase/lglass
{
	qer_editorimage textures/effects/tinfx.tga
	qer_trans 0.6
	surfaceparm nomarks
	surfaceparm nolightmap
	{
		map textures/effects/tinfx2.tga
		blendFunc GL_ONE GL_ONE
		tcGen environment
	}
}