//////////////////////////////////////////////////////////////////////////
// Command map shaders for mml_helmsdeep

levelshots/mml_claustrophobia_cc_automap
{
    nopicmip
    nocompress
    nomipmaps
    {
        clampmap levelshots/mml_claustrophobia_cc.tga
        depthFunc equal
        rgbGen identity
    }
}

levelshots/mml_claustrophobia_cc_trans
{
    nopicmip
    nocompress
    nomipmaps
    {
        clampmap levelshots/mml_claustrophobia_cc.tga
        blendfunc blend
        rgbGen identity
        alphaGen vertex
    }
}

//////////////////////////////////////////////////////////////////////////
// Skybox
textures/mml_claustrophobia/skybox
{
	qer_editorimage textures/skies_sd/goldrush_clouds.tga
	q3map_skylight 15 1
	q3map_sun 0.3 0.3 0.45 100 35 145
	nocompress
	sunshader textures/skies_sd/full_moon2
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -
 
	
	{	fog off
		map textures/skies_sd/goldrush_clouds.tga
		tcMod scale 5 5
		tcMod scroll 0.0015 -0.003
		rgbGen identityLighting
	}


	{	fog off
		map textures/skies/nightsky1.jpg
		tcMod scale 10 10
		blendfunc add
		rgbGen identityLighting
	}

	{
		fog off
		clampmap textures/skies_sd/goldrush_mask.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		// rgbGen identityLighting
		//rgbGen const ( 0.6 0.6 0.6 ) 
		rgbGen const ( 0.4 0.4 0.4 ) 
	}
}

//////////////////////////////////////////////////////////////////////////
// Ingame shaders
textures/mml_claustrophobia/grass
{
	qer_editorimage textures/temperate_sd/master_grass_dirt3
	q3map_surfaceModel models/mapobjects/plants_sd/grass_low.md3 24 0.02 0.3 0.6 0 360 1
	surfaceparm grasssteps

	// Q3map2 properties
	q3map_nonplanar
	q3map_shadeAngle 90

	implicitmap textures/temperate_sd/master_grass_dirt3
}

textures/mml_claustrophobia/cave_wall
{
	q3map_nonplanar
	q3map_shadeAngle 160

	implicitMap -
}

textures/mml_claustrophobia/cave_floor
{
	qer_editorimage textures/stone/mxrock1aa.tga

	// Q3map2 properties
	q3map_nonplanar
	q3map_shadeAngle 90
	surfaceparm gravelsteps
	surfaceparm landmine

	implicitMap textures/stone/mxrock1aa.tga
}

textures/mml_claustrophobia/window_lit
{
    q3map_lightimage textures/mml_claustrophobia/wlight.b.tga
    qer_editorimage textures/mml_claustrophobia/wlight.tga
    q3map_surfacelight 450
    surfaceparm nomarks
    {
        map $lightmap
        rgbGen identity
    }
    {
        map textures/mml_claustrophobia/wlight.tga
        blendFunc GL_DST_COLOR GL_ZERO
        rgbGen identity
    }
    {
        map textures/mml_claustrophobia/wlight.b.tga
        blendFunc GL_ONE GL_ONE
    }
}
