//====================
//crossing sky texture
//=====================

textures/crossing/sky2
{
	qer_editorimage textures/crossing/gtk_sky2.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
//	q3map_sun .6 .72 .77 25 30 30

	q3map_sun 1 .725 .3725 25 30 30

//	q3map_surfacelight 75

	q3map_surfacelight 100
	//q3map_sun <red> <green> <blue> <intensity> <degrees> <elevation>
      q3map_lightsubdivide 512
	skyparms env/crossing/kell 512 -
}

textures/crossing/sw_patch10_nonsolid
{
	qer_editorimage textures/crossing/sw_patch10.jpg
	qer_trans 0.5
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/crossing/sw_patch10.jpg
		alphaFunc GE128
		depthWrite
		rgbGen vertex
	}
}


textures/crossing/sw_ivy
{
	qer_editorimage textures/crossing/sw_ivy.tga
	surfaceparm trans
	surfaceparm alphashadow
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
	nopicmip

	{
		map textures/crossing/sw_ivy.tga
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}

textures/crossing/anim_flare1
{
	qer_editorimage textures/crossing/flare_on.jpg
	surfaceparm nodamage
//	q3map_surfacelight 200
	deformVertexes autoSprite
//added
	qer_trans 0.40
        surfaceparm trans	
        surfaceparm nomarks	
        surfaceparm nonsolid
	surfaceparm nolightmap

	
	{
		map textures/crossing/flare_off.tga
		blendFunc add
		rgbGen identity
	}
	{
		animMap 2 textures/crossing/flare_on.tga textures/crossing/flare_on.tga textures/crossing/flare_on.tga textures/crossing/flare_on.tga textures/crossing/flare_off.tga textures/crossing/flare_off.tga textures/crossing/flare_off.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave inverseSawtooth 0 1 0 2
	}

	
}


//Gold Light Corona
textures/crossing/flare001
{
    deformVertexes autoSprite
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nolightmap
    cull none
          {
            clampmap textures/crossing/flare001.jpg
            blendFunc GL_ONE GL_ONE
          }
}
//Red Light Corona
textures/crossing/flare003
{
    deformVertexes autoSprite
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nolightmap
    cull none
          {
            clampmap textures/crossing/flare003.jpg
            blendFunc GL_ONE GL_ONE
          }
}

textures/crossing/engine_window
{
	{
		map textures/crossing/engine_window.tga
	}
	{	
		map textures/effects/tinfx.tga
		tcgen environment
		blendFunc GL_ONE GL_ONE
	}	
	{
		map textures/crossing/engine_window.tga
   		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap 
		blendfunc gl_dst_color gl_src_color
	}
}

textures/crossing/engine_window2
{
	{
		map textures/crossing/engine_window2.tga
	}
	{	
		map textures/effects/tinfx.tga
		tcgen environment
		blendFunc GL_ONE GL_ONE
	}	
	{
		map textures/crossing/engine_window2.tga
   		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap 
		blendfunc gl_dst_color gl_src_color
	}
}


textures/crossing/sw_ladder
{
	qer_editor_image textures/crossing/sw_ladder.tga
	qer_trans 0.40
	cull disable
	{
		map textures/crossing/sw_ladder.tga
		alphaFunc GE128
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}



//===========
//  Lights
//===========


textures/crossing/panel_10k
{
	qer_editorimage textures/crossing/panel.tga
	surfaceparm nomarks
	q3map_surfacelight 10000
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/crossing/panel.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/crossing/panel_blend.tga
		blendfunc GL_ONE GL_ONE
	}
}

textures/crossing/panel_5k
{
	qer_editorimage textures/crossing/panel.tga
	surfaceparm nomarks
	q3map_surfacelight 5000
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/crossing/panel.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/crossing/panel_blend.tga
		blendfunc GL_ONE GL_ONE
	}
}


//////////////////////////////////
// From RealWorld Light by Shminky
//////////////////////////////////

textures/crossing/Sodium_1k
{
	qer_trans 0.70
	qer_nocarve
	qer_editorimage textures/crossing/lightsod.tga
	surfaceparm trans
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm nolightmap

	skyparms - - -
	
	q3map_surfacelight 1000
	q3map_lightimage textures/crossing/sodium.tga
}


textures/crossing/flourescent_500
{
	qer_trans 0.50
	qer_nocarve
	qer_editorimage textures/crossing/lightflo.tga
	surfaceparm trans
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm nolightmap

	skyparms - - -
	

	q3map_surfacelight 500
	q3map_lightimage textures/crossing/flouresc.tga
}


//////////////////////////////
//From sweetnutz
/////////////////////////////

textures/crossing/sn_window2
{
	{	
		map textures/crossing/sn_window2.tga
	}
	{
		map textures/effects/tinfx.tga
		tcgen environment
		blendFunc GL_ONE GL_ONE
	}

	{
		map textures/crossing/sn_window2.tga
   		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendfunc gl_dst_color gl_src_color
	}
}



textures/crossing/in_window
{
	{	
		map textures/crossing/in_window.jpg
	}
	{
		map textures/effects/tinfx.tga
		tcgen environment
		blendFunc GL_ONE GL_ONE
	}

	{
		map textures/crossing/in_window.jpg
   		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendfunc gl_dst_color gl_src_color
	}
}




//phong stuff

textures/crossing/sw_phong
{ 

      q3map_nonplanar
      qer_editorimage textures/crossing/blackrock_3.jpg
      q3map_shadeangle 120  

      { 

             map textures/crossing/blackrock_3.jpg
             rgbGen identity 
      }
      { 
             map $lightmap 
             tcGen lightmap 
             blendFunc GL_DST_COLOR GL_ZERO 
             rgbGen identity 
      } 
}



// vehicle lights - coloured lights
textures/crossing/rear_red_100
{
	qer_trans 0.70
	qer_editorimage textures/crossing/gtk_rear_light.tga
	surfaceparm trans
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm nolightmap

	skyparms - - -
	light 1
	
	q3map_surfacelight 300
	q3map_lightimage textures/crossing/rear_light_red.tga
}





textures/crossing/corona_white
{
    qer_trans 0.60
    deformVertexes autoSprite
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nolightmap
    cull none
          {
            clampmap textures/crossing/corona_white.jpg
            blendFunc GL_ONE GL_ONE
          }
}


//reworked corona

textures/crossing/corona
{
    deformVertexes autoSprite
    surfaceparm trans
    surfaceparm nomarks
    surfaceparm nolightmap
    cull none
          {
            clampmap textures/crossing/corona.jpg
            blendFunc GL_ONE GL_ONE
          }
}




textures/crossing/sw_fence
{
	qer_editor_image textures/crossing/sw_fence.tga
	qer_trans 0.40
	cull disable
	{
		map textures/crossing/sw_fence.tga
		alphaFunc GE128
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}





//an attempt at a light emitting window
//for a night setting

textures/crossing/night_window1
{
	qer_editorimage textures/crossing/window3.tga
	surfaceparm nomarks
	q3map_surfacelight 100
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/crossing/window3.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/crossing/window3_blend.tga
		blendfunc GL_ONE GL_ONE
	}
}


textures/crossing/street_1k
{
surfaceparm nomarks	
qer_editorimage textures/crossing/street1.tga
	{	
		map textures/crossing/street1.tga
	}
	{
		map textures/effects/tinfx.tga
		tcgen environment
		blendFunc GL_ONE GL_ONE
	}

	{
		map textures/crossing/street1.tga
   		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
	{
		map $lightmap
		blendfunc gl_dst_color gl_src_color
	}
}


