//
// Unvanquished shader file for the Vega 2 texture set
//
// This conversion is a complete rework of the original
// Vega texture set. Some textures have been replaced,
// others have been updated, with higher resolution versions
// were possible.
// 
// http://ingar.satgnu.net
// ingar@telenet.be
//

// ------------------------------------------------------------
// Notes 

// To preserve compatibility with the Xonotic conversion,
// shader names should match with the name of the diffuse map
// if no corresponding xonotic shader exists.
//
// If a corresponding xonotic shader does exist,
// shader name and diffuse map name should differ to prevent
// conflicting filenames.
//
// q3map_lightimage does not work with "new style" shaders,
// use q3map_lightRGB instead**
// ** using -nocollapse in the q3map2 light phase solves this
//
// ------------------------------------------------------------

// -- lightmap style does not work
// q3map_lightstyle 2
// -- add the following to worldspawn
// _style1rgbGen wave square 0.0 1.0 0 1.0

// ------------------------------------------------------------
// CUSTOM MAP SHADERS

// skybox "Vega" by Ingar
// textures/vega/sky
// {
//       qer_editorimage env/vega/ing1_sky_small
//       surfaceparm noimpact
//       surfaceparm nolightmap
//       surfaceparm sky
//       // sunlight position red green blue intensity degrees elevation
//       q3map_sun   .9 .9 .9 75 90 25
//       // sunlight intensity
//       q3map_surfacelight 150
// 
//       skyparms env/vega/ing1_sky - -
// }

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// plain colors

// black
textures/vega2/black
{
	qer_editorimage textures/vega2/black
	
	diffusemap textures/vega2/black
	
	surfaceparm nomarks
	surfaceparm nolightmap
}

// black (nonsolid)
textures/vega2/black_nonsolid
{
	qer_editorimage textures/vega2/black
	
	diffusemap textures/vega2/black
	
	surfaceparm nomarks
	surfaceparm nolightmap
	surfaceparm nonsolid
}

// white
textures/vega2/white
{
        diffusemap textures/vega2/white
        
	qer_editorimage textures/vega2/white
	
	surfaceparm nomarks
	surfaceparm nolightmap
	surfaceparm nonsolid
}

// white (nonsolid)
textures/vega2/white_nonsolid
{
        diffusemap textures/vega2/white
        
	qer_editorimage textures/vega2/white
	
	surfaceparm nomarks
	surfaceparm nolightmap
}

// white (nonsolid, light)
textures/vega2/white_nonsolid_150
{
        diffusemap textures/vega2/white
        
	qer_editorimage textures/vega2/white
	
	surfaceparm nomarks
	surfaceparm nolightmap
	
	q3map_surfacelight 150
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// vega industries logos

textures/vega2/vega_banner
{
	qer_editorimage textures/vega2/vega_banner_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/vega_banner_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/vega_motto
{
	qer_editorimage textures/vega2/vega_motto_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/vega_motto_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}


// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// arrows

textures/vega2/arrow_elevator
{
	qer_editorimage textures/vega2/arrow_elevator_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/arrow_elevator_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/arrow_stairs
{
	qer_editorimage textures/vega2/arrow_stairs_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/arrow_stairs_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// panel signs

textures/vega2/sign_gate1
{
	qer_editorimage textures/vega2/sign_gate1_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/sign_gate1_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/sign_gate2
{
	qer_editorimage textures/vega2/sign_gate2_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/sign_gate2_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/sign_hatch
{
	qer_editorimage textures/vega2/sign_hatch_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/sign_hatch_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/sign_workshop
{
        qer_editorimage textures/vega2/sign_workshop_blend

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/sign_workshop_blend
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// holo signs

textures/vega2/holo_gate1
{
	qer_editorimage textures/vega2/arrow_gate1_blend
	qer_trans .7
	
	cull none
	
	q3map_surfacelight 150
	
	// blue light #00baff
        q3map_lightRGB 0.0 0.7924 1.0
        
        // scrolling background
	{
		map textures/vega2/arrow_holo_blend
		tcmod scroll 0.0 0.25
		blendfunc filter
	}
	
	// arrow sign
        {
                map textures/vega2/arrow_gate1_blend
                rgbGen identity
		blendfunc blend
        }
}

textures/vega2/holo_gate2_broken
{
	qer_editorimage textures/vega2/arrow_gate2_distort
	qer_trans .7
	
	cull none
	
	q3map_surfacelight 150
	
	// blue light #00baff
        q3map_lightRGB 0.0 0.7924 1.0
        
        // scrolling background
	{
		map textures/vega2/arrow_holo_blend
		tcmod scroll 0.0 0.25
		blendfunc filter
	}
	
	// arrow sign
        {
                animmap 8 textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_blend textures/vega2/arrow_gate2_distort
                
                rgbGen identity
		blendfunc blend
        }
}

textures/vega2/holo_workshop_broken
{
	qer_editorimage textures/vega2/arrow_workshop_distort
	qer_trans .7
	
	cull none
	
	q3map_surfacelight 150
	
	// blue light #00baff
        q3map_lightRGB 0.0 0.7924 1.0
        
        // scrolling background
	{
		map textures/vega2/arrow_holo_blend
		tcmod scroll 0.0 0.25
		blendfunc filter
	}
	
	// arrow sign
        {
                animmap 8 textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_blend textures/vega2/arrow_workshop_distort
                
                rgbGen identity
		blendfunc blend
        }
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// misc overlays

textures/vega2/roadstrip
{
	qer_editorimage textures/vega2/roadstrip_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
	{
		map textures/vega2/roadstrip_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

// wheeltracks
textures/vega2/wheeltracks
{
	qer_editorimage textures/vega2/wheeltracks_qer
	
	surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
	
	{
		rgbGen identity
		map textures/vega2/wheeltracks_blend
		blendfunc blend
		depthwrite
	}
}

// custom lights

textures/vega2/squarelight01_red_150
{
	qer_editorimage textures/vega2/squarelight01_red_qer
	
	// red
	q3map_lightRGB 1.0 0.0 0.0
	q3map_surfacelight 150

	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular	
	{
            map textures/vega2/squarelight01_glow
            blend add
            red 1.0
            green 0.0
            blue 0.0
        }
}

// ------------------------------------------------------------
// TEXTURE PACK SHADERS


// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// base

// base blue metal
textures/vega2/base01
{
	qer_editorimage textures/vega2/base01_diffuse
	
	diffusemap	textures/vega2/base01_diffuse
	normalmap	textures/vega2/base01_normal
	specularmap	textures/vega2/base01_specular
}

// base blue metal (nonsolid)
textures/vega2/base01_nonsolid
{
	qer_editorimage textures/vega2/base01_diffuse
	
	diffusemap	textures/vega2/base01_diffuse
	normalmap	textures/vega2/base01_normal
	specularmap	textures/vega2/base01_specular
	
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
}

// base black metal
textures/vega2/base01a
{
	qer_editorimage textures/vega2/base01a_diffuse
	
	diffusemap	textures/vega2/base01a_diffuse
	normalmap	textures/vega2/base01_normal
	specularmap	textures/vega2/base01_specular
}

// base black metal (nonsolid)
textures/vega2/base01a_nonsolid
{
	qer_editorimage textures/vega2/base01a_diffuse
	
	diffusemap	textures/vega2/base01a_diffuse
	normalmap	textures/vega2/base01_normal
	specularmap	textures/vega2/base01_specular
	
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
}

textures/vega2/base02
{
	qer_editorimage textures/vega2/base02_diffuse
	
	diffusemap	textures/vega2/base02_diffuse
	normalmap	textures/vega2/base02_normal
	specularmap	textures/vega2/base02_specular
}

textures/vega2/base02_nonsolid
{
	qer_editorimage textures/vega2/base02_diffuse
	
	diffusemap	textures/vega2/base02_diffuse
	normalmap	textures/vega2/base02_normal
	specularmap	textures/vega2/base02_specular
	
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
}

textures/vega2/base03
{
	qer_editorimage textures/vega2/base03_diffuse
	
	diffusemap	textures/vega2/base03_diffuse
	normalmap	textures/vega2/base03_normal
	specularmap	textures/vega2/base03_specular
}

textures/vega2/base03_nonsolid
{
	qer_editorimage textures/vega2/base03_diffuse
	
	diffusemap	textures/vega2/base03_diffuse
	normalmap	textures/vega2/base03_normal
	specularmap	textures/vega2/base03_specular
	
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
}

textures/vega2/base03a
{
	qer_editorimage textures/vega2/base03a_diffuse
	
	diffusemap	textures/vega2/base03a_diffuse
	normalmap	textures/vega2/base03_normal
	specularmap	textures/vega2/base03_specular
}

textures/vega2/base03a_nonsolid
{
	qer_editorimage textures/vega2/base03a_diffuse
	
	diffusemap	textures/vega2/base03a_diffuse
	normalmap	textures/vega2/base03_normal
	specularmap	textures/vega2/base03_specular
	
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// concrete

textures/vega2/concrete01
{
	qer_editorimage textures/vega2/concrete01_diffuse
	
	diffusemap	textures/vega2/concrete01_diffuse
	normalmap	textures/vega2/concrete01_normal
	specularmap	textures/vega2/concrete01_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// asphalt

textures/vega2/asphalt01
{
	qer_editorimage textures/vega2/asphalt01_diffuse
	
	diffusemap	textures/vega2/asphalt01_diffuse
	normalmap	textures/vega2/asphalt01_normal
	specularmap	textures/vega2/asphalt01_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// panels

textures/vega2/panel01
{
	qer_editorimage textures/vega2/panel01_diffuse
	
	diffusemap	textures/vega2/panel01_diffuse
	normalmap	textures/vega2/panel01_normal
	specularmap	textures/vega2/panel01_specular
}

textures/vega2/panel01_nocull
{
	qer_editorimage textures/vega2/panel01_diffuse
	
	diffusemap	textures/vega2/panel01_diffuse
	normalmap	textures/vega2/panel01_normal
	specularmap	textures/vega2/panel01_specular
	
	cull none
}

textures/vega2/panel01a
{
	qer_editorimage textures/vega2/panel01a_diffuse
	
	diffusemap	textures/vega2/panel01a_diffuse
	normalmap	textures/vega2/panel01_normal
	specularmap	textures/vega2/panel01_specular
}

textures/vega2/panel02
{
	qer_editorimage textures/vega2/panel02_diffuse
	
	diffusemap	textures/vega2/panel02_diffuse
	normalmap	textures/vega2/panel02_normal
	specularmap	textures/vega2/panel02_specular
}

textures/vega2/panel02a
{
	qer_editorimage textures/vega2/panel02a_diffuse
	
	diffusemap	textures/vega2/panel02a_diffuse
	normalmap	textures/vega2/panel02_normal
	specularmap	textures/vega2/panel02_specular
}

textures/vega2/panel03
{
	qer_editorimage textures/vega2/panel03_diffuse
	
	diffusemap	textures/vega2/panel03_diffuse
	normalmap	textures/vega2/panel03_normal
	specularmap	textures/vega2/panel03_specular
}

textures/vega2/panel03a
{
	qer_editorimage textures/vega2/panel03a_diffuse
	
	diffusemap	textures/vega2/panel03a_diffuse
	normalmap	textures/vega2/panel03_normal
	specularmap	textures/vega2/panel03_specular
}

textures/vega2/panel04
{
	qer_editorimage textures/vega2/panel04_diffuse
	
	diffusemap	textures/vega2/panel04_diffuse
	normalmap	textures/vega2/panel04_normal
	specularmap	textures/vega2/panel04_specular
}

textures/vega2/panel04a
{
	qer_editorimage textures/vega2/panel04a_diffuse
	
	diffusemap	textures/vega2/panel04a_diffuse
	normalmap	textures/vega2/panel04_normal
	specularmap	textures/vega2/panel04_specular
}

// panel with lights side)
textures/vega2/panel05_300
{
	qer_editorimage textures/vega2/panel05_diffuse
	
	diffusemap	textures/vega2/panel05_diffuse
	normalmap	textures/vega2/panel05_normal
	specularmap	textures/vega2/panel05_specular
	glowmap         textures/vega2/panel05_glow
	
	q3map_surfacelight 300
}

textures/vega2/panel05_500
{
	qer_editorimage textures/vega2/panel05_diffuse
	
	diffusemap	textures/vega2/panel05_diffuse
	normalmap	textures/vega2/panel05_normal
	specularmap	textures/vega2/panel05_specular
	glowmap         textures/vega2/panel05_glow
	
	q3map_surfacelight 500
}

// panel with lights (centered)
textures/vega2/panel06_300
{
	qer_editorimage textures/vega2/panel06_diffuse
	
	diffusemap	textures/vega2/panel06_diffuse
	normalmap	textures/vega2/panel06_normal
	specularmap	textures/vega2/panel06_specular
	glowmap         textures/vega2/panel06_glow
	
	q3map_surfacelight 300
}

textures/vega2/panel06_500
{
	qer_editorimage textures/vega2/panel06_diffuse
	
	diffusemap	textures/vega2/panel06_diffuse
	normalmap	textures/vega2/panel06_normal
	specularmap	textures/vega2/panel06_specular
	glowmap         textures/vega2/panel06_glow
	
	q3map_surfacelight 500
}

textures/vega2/panel06broken
{
	qer_editorimage textures/vega2/panel06broken_diffuse
	
	diffusemap	textures/vega2/panel06broken_diffuse
	normalmap	textures/vega2/panel06_normal
	specularmap	textures/vega2/panel06_specular
	
	q3map_surfacelight 100
	
	// -- lightmap style does not work
	// q3map_lightstyle 1	
	// -- add the following to worldspawn
	// _style1rgbGen wave sawtooth 0.0 1.0 0 0.5
	
	{
		map textures/vega2/panel06_glow
		blendfunc add
		rgbGen wave sawtooth 0.0 1.0 0 0.5
	}
}

textures/vega2/panel07
{
	qer_editorimage textures/vega2/panel07_diffuse
	
	diffusemap	textures/vega2/panel07_diffuse
	normalmap	textures/vega2/panel07_normal
	specularmap	textures/vega2/panel07_specular
}

textures/vega2/panel07a
{
	qer_editorimage textures/vega2/panel07a_diffuse
	
	diffusemap	textures/vega2/panel07a_diffuse
	normalmap	textures/vega2/panel07_normal
	specularmap	textures/vega2/panel07_specular
}

textures/vega2/panel07b
{
	qer_editorimage textures/vega2/panel07b_diffuse
	
	diffusemap	textures/vega2/panel07b_diffuse
	normalmap	textures/vega2/panel07_normal
	specularmap	textures/vega2/panel07_specular
}

textures/vega2/panel07c
{
	qer_editorimage textures/vega2/panel07c_diffuse
	
	diffusemap	textures/vega2/panel07c_diffuse
	normalmap	textures/vega2/panel07_normal
	specularmap	textures/vega2/panel07_specular
}

// beige panels
textures/vega2/panel08
{
	qer_editorimage textures/vega2/panel08_diffuse
	
	diffusemap	textures/vega2/panel08_diffuse
	normalmap	textures/vega2/panel08_normal
	specularmap	textures/vega2/panel08_specular
}

// beige panels with light strips
textures/vega2/panel08a_300
{
	qer_editorimage textures/vega2/panel08a_diffuse
	
	diffusemap	textures/vega2/panel08a_diffuse
	normalmap	textures/vega2/panel08_normal
	specularmap	textures/vega2/panel08_specular
	glowmap         textures/vega2/panel08a_glow
	
	q3map_surfacelight 300
	q3map_lightRGB 1.0 1.0 0.93
}

// metal panel with round blue lights
textures/vega2/light01_300
{
	qer_editorimage textures/vega2/light01_diffuse
	
	diffusemap	textures/vega2/light01_diffuse
	normalmap	textures/vega2/light01_normal
	specularmap	textures/vega2/light01_specular
	glowmap         textures/vega2/light01_glow
	
	q3map_surfacelight 300
	// blue #73C0D7
	q3map_lightRGB 0.6078 0.7529 0.8431
}

// metal panel (dark) with round blue lights
textures/vega2/light01a_300
{
	qer_editorimage textures/vega2/light01a_diffuse
	
	diffusemap	textures/vega2/light01a_diffuse
	normalmap	textures/vega2/light01_normal
	specularmap	textures/vega2/light01_specular
	glowmap         textures/vega2/light01_glow
	
	q3map_surfacelight 300
	// blue #73C0D7
	q3map_lightRGB 0.6078 0.7529 0.8431
}

// metal panel with round brown lights
textures/vega2/light02_300
{
	qer_editorimage textures/vega2/light02_qer
	
	diffusemap	textures/vega2/light02_diffuse
	normalmap	textures/vega2/light02_normal
	specularmap	textures/vega2/light02_specular
	glowmap         textures/vega2/light02_glow
	
	q3map_surfacelight 300
	// brown #BEB39A
	q3map_lightRGB 0.745098 0.701961 0.603922
}

// metal panel with round brown lights (no light)
textures/vega2/light02
{
	qer_editorimage textures/vega2/light02_diffuse
	
	diffusemap	textures/vega2/light02_diffuse
	normalmap	textures/vega2/light02_normal
	specularmap	textures/vega2/light02_specular
}

// metal panel (dark) with round brown lights
textures/vega2/light02a_300
{
	qer_editorimage textures/vega2/light02a_qer
	
	diffusemap	textures/vega2/light02a_diffuse
	normalmap	textures/vega2/light02_normal
	specularmap	textures/vega2/light02_specular
	glowmap         textures/vega2/light02_glow
	
	q3map_surfacelight 300
	// brown #BEB39A
	q3map_lightRGB 0.745098 0.701961 0.603922
}

// metal panel (dark) with round brown lights (no light)
textures/vega2/light02a
{
	qer_editorimage textures/vega2/light02a_diffuse
	
	diffusemap	textures/vega2/light02a_diffuse
	normalmap	textures/vega2/light02_normal
	specularmap	textures/vega2/light02_specular
}

// small round blue light (blue metal background)
textures/vega2/light03_1500
{
	qer_editorimage textures/vega2/light03_diffuse
	
	diffusemap	textures/vega2/light03_diffuse
	normalmap	textures/vega2/light03_normal
	specularmap	textures/vega2/light03_specular
	glowmap         textures/vega2/light03_glow
	
	q3map_surfacelight 1500
	// blue #73C0D7
	q3map_lightRGB 0.6078 0.7529 0.8431
}

// small round blue light (dark metal background)
textures/vega2/light03a_1500
{
	qer_editorimage textures/vega2/light03a_diffuse
	
	diffusemap	textures/vega2/light03a_diffuse
	normalmap	textures/vega2/light03_normal
	specularmap	textures/vega2/light03_specular
	glowmap         textures/vega2/light03_glow
	
	q3map_surfacelight 1500
	// blue #73C0D7
	q3map_lightRGB 0.6078 0.7529 0.8431
}

// small round brown light (blue metal background)
textures/vega2/light04_1500
{
	qer_editorimage textures/vega2/light04_diffuse
	
	diffusemap	textures/vega2/light04_diffuse
	normalmap	textures/vega2/light04_normal
	specularmap	textures/vega2/light04_specular
	glowmap         textures/vega2/light04_glow
	
	q3map_surfacelight 1500
	// brown #BEB39A
	q3map_lightRGB 0.745098 0.701961 0.603922
}

// small round brown light (dark metal background)
textures/vega2/light04a_1500
{
	qer_editorimage textures/vega2/light04a_diffuse
	
	diffusemap	textures/vega2/light04a_diffuse
	normalmap	textures/vega2/light04_normal
	specularmap	textures/vega2/light04_specular
	glowmap         textures/vega2/light04_glow
	
	q3map_surfacelight 1500
	// brown #BEB39A
	q3map_lightRGB 0.745098 0.701961 0.603922
}

// small square light
textures/vega2/squarelight01_off
{
	qer_editorimage textures/vega2/squarelight01_off_diffuse
	
	diffusemap	textures/vega2/squarelight01_off_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular
}

textures/vega2/squarelight01_white_1500
{
	qer_editorimage textures/vega2/squarelight01_white_qer
	
	q3map_surfacelight 1500
	
	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular
	{
            map textures/vega2/squarelight01_glow
            blend add
        }
}

textures/vega2/squarelight01_blue_1500
{
	qer_editorimage textures/vega2/squarelight01_blue_qer
	
	// blue #73C0D7
	q3map_lightRGB 0.6078 0.7529 0.8431
	q3map_surfacelight 1500
	
	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular	
	{
            map textures/vega2/squarelight01_glow
            blend add
            red 0.6078 
            green 0.7529 
            blue 0.8431
        }
}

textures/vega2/squarelight01_red_1500
{
	qer_editorimage textures/vega2/squarelight01_red_qer
	
	// red
	q3map_lightRGB 1.0 0.0 0.0
	q3map_surfacelight 1500

	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular	
	{
            map textures/vega2/squarelight01_glow
            blend add
            red 1.0
            green 0.0
            blue 0.0
        }
}

textures/vega2/squarelight01_green_1500
{
	qer_editorimage textures/vega2/squarelight01_green_qer
	
	// green
	q3map_lightRGB 0.0 1.0 0.0
	q3map_surfacelight 1500

	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular	
	{
            map textures/vega2/squarelight01_glow
            blend add
            red 0.0
            green 1.0
            blue 0.0
        }
}

textures/vega2/squarelight01_yellow_1500
{
	qer_editorimage textures/vega2/squarelight01_yellow_qer
	
	// yellow
	q3map_lightRGB 1.0 1.0 0.0
	q3map_surfacelight 1500

	diffusemap	textures/vega2/squarelight01_diffuse
	normalmap	textures/vega2/squarelight01_normal
	specularmap	textures/vega2/squarelight01_specular	
	{
            map textures/vega2/squarelight01_glow
            blend add
            red 1.0
            green 1.0
            blue 0.0
        }
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// dirt

textures/vega2/dirt01
{
	qer_editorimage textures/vega2/dirt01_diffuse
	
	diffusemap	textures/vega2/dirt01_diffuse
	normalmap	textures/vega2/dirt01_normal
	specularmap	textures/vega2/dirt01_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// glass

textures/vega2/glass01
{
	qer_editorimage textures/vega2/glass01_blend
	qer_blend .7
	
	cull none
	
	{
                map textures/vega2/glass01_env
		blendFunc gl_dst_color gl_one
		tcGen environment
	}
        {
                map textures/vega2/glass01_blend
		blendfunc filter
        }
        {
                map $lightmap
                blendFunc gl_dst_color gl_one
        }
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// rust

textures/vega2/rust01
{
	qer_editorimage textures/vega2/rust01_diffuse
	
	diffusemap	textures/vega2/rust01_diffuse
	normalmap	textures/vega2/rust01_normal
	specularmap	textures/vega2/rust01_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// tiles

textures/vega2/tile01
{
	qer_editorimage textures/vega2/tile01_diffuse
	
	diffusemap	textures/vega2/tile01_diffuse
	normalmap	textures/vega2/tile01_normal
	specularmap	textures/vega2/tile01_specular
}

textures/vega2/tile01a
{
	qer_editorimage textures/vega2/tile01a_diffuse
	
	diffusemap	textures/vega2/tile01a_diffuse
	normalmap	textures/vega2/tile01_normal
	specularmap	textures/vega2/tile01_specular
}

textures/vega2/tile02
{
	qer_editorimage textures/vega2/tile02_diffuse
	
	diffusemap	textures/vega2/tile02_diffuse
	normalmap	textures/vega2/tile02_normal
	specularmap	textures/vega2/tile02_specular
}

textures/vega2/tile02a
{
	qer_editorimage textures/vega2/tile02a_diffuse
	
	diffusemap	textures/vega2/tile02a_diffuse
	normalmap	textures/vega2/tile02_normal
	specularmap	textures/vega2/tile02_specular
}

textures/vega2/tile03
{
	qer_editorimage textures/vega2/tile03_diffuse
	
	diffusemap	textures/vega2/tile03_diffuse
	normalmap	textures/vega2/tile03_normal
	specularmap	textures/vega2/tile03_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// trims

textures/vega2/trim01
{
	qer_editorimage textures/vega2/trim01_diffuse
	
	diffusemap	textures/vega2/trim01_diffuse
	normalmap	textures/vega2/trim01_normal
	specularmap	textures/vega2/trim01_specular
}

textures/vega2/trim01a
{
	qer_editorimage textures/vega2/trim01a_diffuse
	
	diffusemap	textures/vega2/trim01a_diffuse
	normalmap	textures/vega2/trim01_normal
	specularmap	textures/vega2/trim01_specular
}

textures/vega2/trim02
{
	qer_editorimage textures/vega2/trim02_diffuse
	
	diffusemap	textures/vega2/trim02_diffuse
	normalmap	textures/vega2/trim02_normal
	specularmap	textures/vega2/trim02_specular
}

textures/vega2/trim02a
{
	qer_editorimage textures/vega2/trim02a_diffuse
	
	diffusemap	textures/vega2/trim02a_diffuse
	normalmap	textures/vega2/trim02_normal
	specularmap	textures/vega2/trim02_specular
}

textures/vega2/trim03
{
	qer_editorimage textures/vega2/trim03_diffuse
	
	diffusemap	textures/vega2/trim03_diffuse
	normalmap	textures/vega2/trim03_normal
	specularmap	textures/vega2/trim03_specular
}

textures/vega2/trim03a
{
	qer_editorimage textures/vega2/trim03a_diffuse
	
	diffusemap	textures/vega2/trim03a_diffuse
	normalmap	textures/vega2/trim03_normal
	specularmap	textures/vega2/trim03_specular
}

textures/vega2/trim03b
{
	qer_editorimage textures/vega2/trim03b_diffuse
	
	diffusemap	textures/vega2/trim03b_diffuse
	normalmap	textures/vega2/trim03_normal
	specularmap	textures/vega2/trim03_specular
}

textures/vega2/trim03b_white_1000
{
	qer_editorimage textures/vega2/trim03b_white_qer
	
	normalmap	textures/vega2/trim03_normal
	diffusemap	textures/vega2/trim03b_light_diffuse
	specularmap	textures/vega2/trim03b_light_specular
	glowmap         textures/vega2/trim03b_white_glow
	
	q3map_surfacelight 1000
}

textures/vega2/trim03b_green_1000
{
	qer_editorimage textures/vega2/trim03b_green_qer
	
	normalmap	textures/vega2/trim03_normal
	diffusemap	textures/vega2/trim03b_light_diffuse	
	specularmap	textures/vega2/trim03b_light_specular
	glowmap         textures/vega2/trim03b_green_glow
		
        // green #b3ffb3
        q3map_lightRGB 0.7020 1.0 0.7020
        
	q3map_surfacelight 1000
}

textures/vega2/trim04
{
	qer_editorimage textures/vega2/trim04_diffuse
	
	diffusemap	textures/vega2/trim04_diffuse
	normalmap	textures/vega2/trim04_normal
	specularmap	textures/vega2/trim04_specular
}

textures/vega2/trim05
{
	qer_editorimage textures/vega2/trim05_diffuse
	
	diffusemap	textures/vega2/trim05_diffuse
	normalmap	textures/vega2/trim05_normal
	specularmap	textures/vega2/trim05_specular
}

textures/vega2/trim06
{
	qer_editorimage textures/vega2/trim06_diffuse
	
	diffusemap	textures/vega2/trim06_diffuse
	normalmap	textures/vega2/trim06_normal
	specularmap	textures/vega2/trim06_specular
}

textures/vega2/trim07
{
	qer_editorimage textures/vega2/trim07_diffuse
	
	diffusemap	textures/vega2/trim07_diffuse
	normalmap	textures/vega2/trim07_normal
	specularmap	textures/vega2/trim07_specular
}

// elevator light strip
textures/vega2/trim08
{
	qer_editorimage textures/vega2/trim08_qer
	
	diffusemap	textures/vega2/trim08_diffuse
	normalmap	textures/vega2/trim08_normal
	specularmap	textures/vega2/trim08_specular
	
	q3map_surfacelight 500
	// yellow #ffff80
	q3map_lightRGB  1.0 1.0 0.5020
	
	{
		map textures/vega2/trim08_glow_1
		blendfunc add
		// rgbGen wave <func> <base> <amp> <phase> <freq>
		rgbGen wave square .25 0.75 0 1
	}
	{
		map textures/vega2/trim08_glow_2
		blendfunc add
		// rgbGen wave <func> <base> <amp> <phase> <freq>
		rgbGen wave square .25 0.75 .5 1
	}
}

// ---- floors

textures/vega2/floor01
{
	qer_editorimage textures/vega2/floor01_diffuse
	
	diffusemap	textures/vega2/floor01_diffuse
	normalmap	textures/vega2/floor01_normal
	specularmap	textures/vega2/floor01_specular
}

textures/vega2/floor02
{
	qer_editorimage textures/vega2/floor02_diffuse
	
	diffusemap	textures/vega2/floor02_diffuse
	normalmap	textures/vega2/floor02_normal
	specularmap	textures/vega2/floor02_specular
	
	surfaceparm metalsteps
}

// ---- pipes

textures/vega2/pipe01
{
	qer_editorimage textures/vega2/pipe01_diffuse
	
	diffusemap	textures/vega2/pipe01_diffuse
	normalmap	textures/vega2/pipe01_normal
	specularmap	textures/vega2/pipe01_specular
}

textures/vega2/pipe01a
{
	qer_editorimage textures/vega2/pipe01a_diffuse
	
	diffusemap	textures/vega2/pipe01_diffuse
	normalmap	textures/vega2/pipe01_normal
	specularmap	textures/vega2/pipe01_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// wood

textures/vega2/wood01
{
	qer_editorimage textures/vega2/wood01_diffuse
	
	diffusemap	textures/vega2/wood01_diffuse
	normalmap	textures/vega2/wood01_normal
	specularmap	textures/vega2/wood01_specular
}

// ---- controls

textures/vega2/controls01
{
	qer_editorimage textures/vega2/controls01_diffuse
	
	diffusemap	textures/vega2/controls01_diffuse
	normalmap	textures/vega2/controls01_normal
	specularmap	textures/vega2/controls01_specular
	
	{
		map textures/vega2/controls01_glow
		blendfunc add
		rgbGen wave square 0.0 1.0 0 1
	}
}

textures/vega2/controls02
{
	qer_editorimage textures/vega2/controls02_qer
	
	diffusemap	textures/vega2/controls02_diffuse
	normalmap	textures/vega2/controls02_normal
	specularmap	textures/vega2/controls02_specular
	glowmap		textures/vega2/controls02_glow
	
	q3map_surfacelight 50
	q3map_lightRGB 1.0 1.0 0.93
}

textures/vega2/controls03
{
	qer_editorimage textures/vega2/controls03_diffuse
	
	diffusemap	textures/vega2/controls03_diffuse
	normalmap	textures/vega2/controls03_normal
	specularmap	textures/vega2/controls03_specular
	
	q3map_surfacelight 50
	q3map_lightRGB 1.0 0.0 0.0
	
	{
		map textures/vega2/controls03_glow
		blendfunc add
		rgbGen wave square 0.0 1.0 0 1
	}
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// posters

textures/vega2/poster_radioactive
{
	qer_editorimage textures/vega2/poster_radioactive_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/poster_radioactive_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/poster_vodka
{
	qer_editorimage textures/vega2/poster_vodka_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/poster_vodka_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

// kyp name tag
textures/vega2/poster_kyp
{
	qer_editorimage textures/vega2/poster_kyp_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/poster_kyp_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

// easter eggs drawing by Josky=KCT=
textures/vega2/poster_eastereggs
{
	qer_editorimage textures/vega2/poster_eastereggs_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/poster_eastereggs_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}

textures/vega2/poster_voltage
{
	qer_editorimage textures/vega2/poster_voltage_diffuse

        surfaceparm nomarks
	surfaceparm nonsolid
	
	polygonOffset
	sort decal
        noShadows
        
	{
		map textures/vega2/poster_voltage_diffuse
		alphafunc GE128
		depthwrite
		rgbGen identity
	}
	{
		rgbGen identity
		map $lightmap
		depthfunc equal
		blendfunc filter
	}
}


// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// safebox

textures/vega2/safebox41
{
        qer_editorimage textures/vega2/safebox41_diffuse
    
        diffusemap	textures/vega2/safebox41_diffuse
	normalmap	textures/vega2/safebox_normal
	specularmap	textures/vega2/safebox41_specular
}

textures/vega2/safebox42
{
        qer_editorimage textures/vega2/safebox42_diffuse
    
        diffusemap	textures/vega2/safebox42_diffuse
	normalmap	textures/vega2/safebox_small_normal
	specularmap	textures/vega2/safebox42_specular
}

textures/vega2/safebox46
{
        qer_editorimage textures/vega2/safebox46_diffuse
    
        diffusemap	textures/vega2/safebox46_diffuse
	normalmap	textures/vega2/safebox_small_normal
	specularmap	textures/vega2/safebox46_specular
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// starcharts

textures/vega2/starchart01
{
        qer_editorimage textures/vega2/starchart01_diffuse
        
        q3map_surfacelight 150
        
	surfaceparm nolightmap
	
	{
		map textures/vega2/starchart01_diffuse
	}
}

textures/vega2/starchart02
{
        qer_editorimage textures/vega2/starchart02_diffuse
    
	q3map_surfacelight 150
	
	surfaceparm nolightmap
	
	{
		map textures/vega2/starchart02_diffuse
	}
	
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// water surface

textures/vega2/water
{
	qer_editorimage textures/vega2/water_qer
        qer_trans .5
  
        surfaceparm nonsolid
        surfaceparm water
        cull none
        
        q3map_globaltexture
        
        deformVertexes wave 64 sin .25 .25 0 .5
        {
                map textures/vega2/water_blend
                blendFunc GL_dst_color GL_one
                rgbgen identity
                tcmod scale .5 .5
		tcmod scroll .01 .01
        }
}
    
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
// plasma

// plasma in glass pipe
textures/vega2/plasma_pipe
{
	qer_editorimage textures/vega2/plasma_pipe_qer
	qer_trans .7
	
	surfaceparm nonsolid
	surfaceparm noimpact
	surfaceparm nomarks        
	cull none
	
	q3map_surfacelight 150	
	// radioactive green #00f200
	q3map_lightRGB 0.0 0.95 0.0
	
        {
                map textures/vega2/plasma_pipe_blend
                tcmod scroll 0.0 0.5
		blendfunc blend
        }
        {
                map textures/vega2/glass01_blend
		blendfunc filter
        }

}

// plasma whirlpool
textures/vega2/plasma_whirl
{
	qer_editorimage textures/vega2/plasma_whirl_qer
        
        q3map_surfacelight 150
        // radioactive green #00f200
	q3map_lightRGB 0.0 0.95 0.0
	q3map_globaltexture

	surfaceparm nonsolid
	surfaceparm noimpact
	surfaceparm nomarks        
	
        cull none

        // deformVertexes wave <div> <func> <base> <amplitude> <phase> <freq>
        deformVertexes wave 64 sin .25 .25 0 .5
        
        {
                map textures/vega2/plasma_whirl_blend
		//tcmod scale .5 .5
                //tcmod turb 1.0 0.5 0.0 0.1
                tcmod rotate 20
                blendfunc blend
        }
}

// plasma content, has the slime surfaceparm, but doesn't draw anything
// base in a shader from the Tremulous map slimepunk by Taiyo.uk
textures/vega2/plasma_nodraw
{
	qer_editorimage textures/vega2/plasma_nodraw_qer
	qer_trans 0.7
	
	surfaceparm noimpact
	surfaceparm slime
	surfaceparm nodraw
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm nomarks
}

// holo projector beam
textures/vega2/holo_projector
{
	qer_editorimage textures/vega2/holo_projector_qer
	qer_trans .7
	
	q3map_surfacelight 25
	q3map_lightRGB 1.0 1.0 1.0
	
	surfaceparm nonsolid
	surfaceparm noimpact
	surfaceparm nomarks        
	cull none
	
        {
                map textures/vega2/holo_projector_blend
                tcmod scroll 0.10 0.25
                
		blendfunc blend
        }
}

// grate01
textures/vega2/grate01
{
	qer_editorimage textures/vega2/grate01_blend
	qer_trans .7
	
	surfaceparm nomarks
	surfaceparm metalsteps
	
	// polygonOffset fixes Z-fighting with objects on top of the grate
	polygonOffset
	cull none
	
	{
		map textures/vega2/grate01_blend
		alphafunc GE128
		blendfunc blend
		depthwrite
	}
	{
		map $lightmap
		depthfunc equal
		blendfunc filter
		rgbGen identity
	}
}

textures/vega2/grate01_nonsolid
{
	qer_editorimage textures/vega2/grate01_blend
	qer_trans .7
	
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm metalsteps
	
	cull none
	
	{
		map textures/vega2/grate01_blend
		alphafunc GE128
		blendfunc blend
		depthwrite
	}
	{
		map $lightmap
		depthfunc equal
		blendfunc filter
		rgbGen identity
	}
}

// grate02
textures/vega2/grate02
{
	qer_editorimage textures/vega2/grate02_blend
	qer_trans .7
	
	surfaceparm nomarks
	surfaceparm metalsteps
	
	// polygonOffset fixes Z-fighting with objects on top of the grate
	polygonOffset
	cull none
	
	{
		map textures/vega2/grate02_blend
		alphafunc GE128
		blendfunc blend
		depthwrite
	}
	{
		map $lightmap
		depthfunc equal
		blendfunc filter
		rgbGen identity
	}
}

textures/vega2/grate02_nonsolid
{
	qer_editorimage textures/vega2/grate02_blend
	qer_trans .7
	
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm metalsteps
	
	cull none
	
	{
		map textures/vega2/grate02_blend
		alphafunc GE128
		blendfunc blend
		depthwrite
	}
	{
		map $lightmap
		depthfunc equal
		blendfunc filter
		rgbGen identity
	}
}