//======================================================================
// tiger_dump.shader
// Last edit: 26/04/03 Sock
// Last edit: 10/22/10 Ischbinz/Niek
//======================================================================


textures/tiger_dump/terrain_base
{
	q3map_lightmapMergable
	q3map_lightmapaxis z
	q3map_lightmapsize 512 512
	q3map_normalimage textures/sd_bumpmaps/normalmap_terrain.tga
	q3map_tcGen ivector ( 512 0 0 ) ( 0 512 0 )
	q3map_tcMod rotate 37
	q3map_tcMod scale 2 2
	surfaceparm landmine
	surfaceparm grasssteps
}

//======================================================================
// Metashader for both sides of the map
// _0: Slighty dirty snow
// _1: Mud/dirt snow
// _2: Clean white snow
// _3: Snow crispy rock
//======================================================================
textures/tiger_dump/terrain1_0
{
        qer_editorimage textures/tiger_dump/master_grass_dirt3.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/master_grass_dirt3.tga
		rgbgen identity
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_1
{
        qer_editorimage textures/tiger_dump/rock_graynoise.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/rock_graynoise.tga
		rgbgen identity
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_2
{
        qer_editorimage textures/tiger_dump/grass_path1.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/grass_path1.tga
		rgbgen identity
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_3
{
        qer_editorimage textures/tiger_dump/rock_ugly_brown.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/rock_ugly_brown.tga
		rgbgen identity
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_0to1
{
        qer_editorimage textures/tiger_dump/master_grass_dirt3.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/master_grass_dirt3.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/rock_graynoise.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_0to2
{
        qer_editorimage textures/tiger_dump/master_grass_dirt3.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/master_grass_dirt3.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/grass_path1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_0to3
{
        qer_editorimage textures/tiger_dump/master_grass_dirt3.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/master_grass_dirt3.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_1to2
{
        qer_editorimage textures/tiger_dump/rock_graynoise.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/rock_graynoise.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/grass_path1.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_1to3
{
        qer_editorimage textures/tiger_dump/rock_graynoise.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/rock_graynoise.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

textures/tiger_dump/terrain1_2to3
{
        qer_editorimage textures/tiger_dump/grass_path1.tga
	q3map_baseshader textures/tiger_dump/terrain_base
	{
		map textures/tiger_dump/grass_path1.tga
		rgbgen identity
	}
	{
		map textures/tiger_dump/rock_ugly_brown.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbgen identity
		alphaGen vertex
	}
	{
		lightmap $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbgen identity
	}
	{
		map textures/detail_sd/snowdetail.tga
		blendFunc GL_DST_COLOR GL_SRC_COLOR
		rgbgen identity
		tcMod scale 5 5
		detail
	}
}

//======================================================================
// New Textures
//======================================================================

textures/tiger_dump/dachziegeltextur
{
	qer_editorimage textures/tiger_dump/dachziegeltextur.jpg
	surfaceparm grasssteps
	{
		map textures/tiger_dump/dachziegeltextur.jpg
		rgbgen identity
	}
}

models/mapobjects/trees_sd/summerbranch01
{

	nopicmip
	qer_alphafunc greater 0.5
	qer_editorimage models/mapobjects/trees_sd/summerbranch01.tga
	cull disable
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nomarks
	implicitMask -
	
}

//==========================================================================
// NEW Track Textures 
//==========================================================================



textures/tiger_dump/tracks/mudd_track03 
{ 
	qer_editorimage textures/tiger_dump/tracks/mudd_track03.tga
	q3map_nonplanar 
	q3map_shadeangle 120 
	surfaceparm trans 
	surfaceparm nonsolid 
	surfaceparm pointlight
	surfaceparm nomarks
	polygonOffset
	
	sort decal-
	
	{
		map textures/tiger_dump/tracks/mudd_track03.tga
		blendfunc blend
       		//blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen identity
	}
}

textures/tiger_dump/tracks/mudd_track03_faint
{ 
	qer_editorimage textures/tiger_dump/tracks/mudd_track03.tga
	q3map_nonplanar 
	q3map_shadeangle 120 
	surfaceparm trans 
	surfaceparm nonsolid 
	surfaceparm pointlight
	surfaceparm nomarks
	polygonOffset
	
	sort decal-
	
	{
		map textures/tiger_dump/tracks/mudd_track03.tga
       		//blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		blendfunc blend
		rgbGen identity
		//rgbGen const ( 0.5 0.5 0.5 )
	}
}

textures/tiger_dump/tracks/mudd_track03_end 
{ 
	qer_editorimage textures/tiger_dump/tracks/mudd_track03_end.tga
	q3map_nonplanar 
	q3map_shadeangle 120 
	surfaceparm trans 
	surfaceparm nonsolid 
	surfaceparm pointlight
	surfaceparm nomarks
	polygonOffset
	
	sort decal-
	
	{
		map textures/tiger_dump/tracks/mudd_track03_end.tga
		blendfunc blend
		rgbGen identity
	}
}

textures/tiger_dump/tracks/mudd_track03_end_faint 
{ 

	qer_editorimage textures/tiger_dump/tracks/mudd_track03_end.tga
	q3map_nonplanar 
	q3map_shadeangle 120 
	surfaceparm trans 
	surfaceparm nonsolid 
	surfaceparm pointlight
	surfaceparm nomarks
	polygonOffset
	
	sort decal-
	
	{
		map textures/tiger_dump/tracks/mudd_track03_end.tga
		blendfunc blend
		rgbGen identity
	}
}

models/mapobjects/tiger/shadow_tank
{
	polygonOffset
	{
		clampmap models/mapobjects/tiger/shadow_tank.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
		rgbGen exactVertex
	}
}


models/mapobjects/tiger/tiger_mg42turret
{
	//{
	//         	map textures/effects/envmap_slate_90.tga
	//         	rgbGen lightingdiffuse
	//         	tcGen environment
	//}
	{
	         	map models/mapobjects/tiger/tiger_mg42turret.tga
				alphaFunc GE128
	         	//blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	         	//rgbGen lightingdiffuse
	}
		
}

models/mapobjects/tiger/body_ao
{
	//cull disable


	{
	         	map models/mapobjects/tiger/body_ao.jpg
			//alphaFunc GE128
	         	//blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	         	rgbGen lightingdiffuse
	}
		
}

models/mapobjects/tiger/grid_ambient
{
	cull disable


	{
	         	map models/mapobjects/tiger/grid_ambient.jpg
			//alphaFunc GE128
	         	//blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	         	rgbGen lightingdiffuse
	}
		
}

models/mapobjects/tiger/turret_aomap
{
	cull disable


	{
	         	map models/mapobjects/tiger/turret_aomap.jpg
			//alphaFunc GE128
	         	//blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
	         	rgbGen lightingdiffuse
	}
		
}

models/mapobjects/tiger/wheel_l
{
	qer_alphafunc gequal 0.5
	cull disable


	{
	         	map models/mapobjects/tiger/wheel.jpg
			alphaFunc GE128
	         	rgbGen lightingdiffuse
	}
		
}
models/mapobjects/tiger/wheel_r
{
	qer_alphafunc gequal 0.5
	cull disable


	{
	         	map models/mapobjects/tiger/wheel.jpg
			alphaFunc GE128
	         	rgbGen lightingdiffuse
	}
		
}
models/mapobjects/tiger/wheel_backward
{
	qer_alphafunc gequal 0.5
	cull disable
	{
			
		clampmap models/mapobjects/tiger/wheel.jpg
		alphaFunc GE128
		rgbGen lightingDiffuse
		tcMod rotate 100
	}
}

models/mapobjects/tiger/wheel_forward
{
	qer_alphafunc gequal 0.5
	cull disable
	{
		clampmap models/mapobjects/tiger/wheel.jpg
		alphaFunc GE128
		rgbGen lightingDiffuse
		tcMod rotate -100
	}
}

models/mapobjects/tiger/chain
{
	cull disable
	nomipmaps
	//nopicmip
	{
		map models/mapobjects/tiger/chain.tga
		alphaFunc GE128
		depthWrite
		//rgbGen vertex
	}

}

textures/tiger_dump/cave_blend
{
	qer_editorimage textures/tiger_dump/grass_alpha.tga
	q3map_nonplanar
	q3map_shadeangle 60
	surfaceparm trans
	surfaceparm nomarks
	surfaceparm gravelsteps
	surfaceparm pointlight
	polygonOffset

	{
		map textures/tiger_dump/grass_alpha.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
	}
}

textures/tiger_dump/sand
{
	qer_editorimage textures/tiger_dump/sand_bubbles_bright.tga
	q3map_nonplanar
	q3map_shadeangle 60
	surfaceparm gravelsteps
	surfaceparm landmine
	surfaceparm pointlight
	polygonOffset

	{
		map textures/tiger_dump/sand_bubbles_bright.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
	}
}

textures/tiger_dump/td_floor
{
	surfaceparm gravelsteps
	q3map_nonplanar
	q3map_shadeangle 179
	qer_editorimage textures/tiger_dump/master_grass_dirt3.tga
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/tiger_dump/master_grass_dirt3.tga
		blendFunc filter
	}
}

textures/tiger_dump/holzschindel
{
	surfaceparm woodsteps
	q3map_nonplanar
	q3map_shadeangle 179
	qer_editorimage textures/tiger_dump/holzschindel.jpg
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/tiger_dump/holzschindel.jpg
		blendFunc filter
	}
}

textures/tiger_dump/dachziegeltextur
{
	surfaceparm roofsteps
	q3map_nonplanar
	q3map_shadeangle 179
	qer_editorimage textures/tiger_dump/dachziegeltextur.jpg
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/tiger_dump/dachziegeltextur.jpg
		blendFunc filter
	}
}

models/mapobjects/tiger/cm_tiger
{
	nocompress
	nopicmip
	{
		map models/mapobjects/tiger/cm_tiger.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
	}
}


textures/tiger_dump/ufer
{ 

	qer_editorimage textures/tiger_dump/ufer.tga
	q3map_nonplanar 
	q3map_shadeangle 120 
	surfaceparm trans 
	surfaceparm nonsolid 
	surfaceparm pointlight
	surfaceparm nomarks
	polygonOffset
	
	sort decal-
	
	{
		map textures/tiger_dump/ufer.tga
		//blendfunc blend
		//rgbGen identity
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
	}
}



textures/tiger_dump/river
{
	qer_editorimage textures/tiger_dump/wasser.tga
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm water
	cull disable
	deformVertexes wave 512 sin 0 3 0 0.2 
	qer_trans 0.5
	q3map_globaltexture
	{
		map $lightmap 
		blendfunc filter
		rgbGen identity
		tcGen lightmap 
	}
	{
		map textures/tiger_dump/water.tga
		blendfunc gl_dst_color gl_one_minus_src_color
		rgbGen wave triangle 0 2 0 0.2 
		tcMod scale 1 1
		//tcMod scroll 0.0004 -0.0001
		tcMod stretch sin 1 0.04 0 0.005 
	}
	{
		map textures/tiger_dump/wasser.tga
		blendfunc add
		//tcMod scroll 0.00035 -0.00012
		tcMod stretch sin 1 0.05 0 0.005 
	}
	{
		map textures/tiger_dump/wasser.tga
		blendfunc filter
		//tcMod scroll -0.00035 0.00025
		tcMod transform 1.5 0 1.5 1 1 2
		tcMod stretch sin 1 0.06 0 0.005 
	}
}

/////////////////////////////////////////////////////////////////////
// ENDLESS SKY - BY AVOC @ eft-clan.com
// If you wish to use this sky, please leave this part in the shader
// or give proper credit in the readme
/////////////////////////////////////////////////////////////////////

textures/tiger_dump/sky/endless_sky
{
	qer_editorimage textures/tiger_dump/sky/skybox_editor.jpg
	
	skyParms textures/tiger_dump/sky/endless 2048 -

	q3map_sunExt 1.00 .90 .80 200 270 45	// R G B Intensity Angle Pitch


	q3map_skylight 150 4                    //amount iterations
	q3map_noFog

	surfaceparm sky                         //flags compiler that this is sky
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nodlight
	nopicmip
	nomipmaps

}
