;====================================
;ISUZU FVR900 - Shader - by MBW13
;====================================
;Exterior panels and parts
;====================================
shader_body
{
	layer0
	{
		map=gradient.tga
		texgen_s=sphere_map
		texgen_t=sphere_map
		emission=1. 1. 1. 1.
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
		shininess=24
		specular=0.75 0.75 0.75
		blendfunc=filter
	}
	layer2
	{
		map=body.tga
		blendfunc=one src_alpha
	}
}

shader_truckside
{
	layer0
	{
		map=truckside.tga
	}
}

shader_mudflaps
{
  layer0
  {
    map=mudflaps.tga
  }
}

shader_truckback
{
	layer0
	{
		map=truckback.tga
	}
}

shader_license
{
	layer0
	{
		map=license.tga
	}
}

shader_bodydark
{
	layer0
	{
		map=gradient.tga
		texgen_s=sphere_map
		texgen_t=sphere_map
		emission=1. 1. 1. 1.
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
		shininess=14
		specular=0.75 0.75 0.75
		blendfunc=filter
	}
	layer2
	{
		map=bodydark.tga
		blendfunc=one src_alpha
	}
}

shader_chrome
{
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    texenv=replace
  }
  layer1
  {
    map=chrome.tga
    blendfunc=one src_alpha
    shininess=50
    specular=1 1 1
  }
}

shader_mesh
{
	layer0
	{
		map=mesh.tga
	}
}

shader_logos
{
	layer0
	{
		map=logos.tga
	}
}

shader_darknonshine
{
	layer0
	{
		map=darknonshine.tga
	}
}

;====================================
;Wheels / tyres
;====================================

shader_wheel
{
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    texenv=replace
  }
  layer1
  {
    map=chrome.tga
    blendfunc=one src_alpha
    shininess=50
    specular=1 1 1
  }
}

shader_tyre
{
	layer0
	{
		map=tyre.tga
	}
}

;====================================
;lights and light related
;====================================
shader_redled
{
  	layer0
 	 {
    	map=brakelights.tga
                   blendfunc=blend
                   texenv=replace
                   emission=1 1 1
                   depthwrite=0
 	}
}

shader_lightlenses
{
  layer0
  {
    map=lightlenses.tga
  }
}

shader_lightemit ;this is the actual emission from the lights
{
  layer0
  {
    map=headlights.tga
    blendfunc=blend
    texenv=replace
    emission=1 1 1
    depthwrite=0
  }
}

shader_headlights ;texture applied to the headlights - when lights are off
{
	layer0
	{
		map=headlighttexture.tga
	}
}

shader_indicators
{
	layer0
	{
		map=indicators.tga
	}
}

;====================================
;Mirrors and glass
;====================================

shader_mirror
{
  layer0
  {
    map=$mirror
    emission=0.8 0.8 0.8
  }
  layer1
  {
    map=mirror.tga
    blendfunc=src_color one_minus_src_alpha
  }
}

shader_glass
{
	cull=back
	layer0
	{
		map=glass.tga
		shininess=30
		specular=0.90,0.90,0.90
		diffuse=0.95,0.95,0.95
		ambient=0.13,0.13,0.13
		emission=0.13,0.13,0.13
		depthwrite=0 
		blendfunc=blend
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
		blendfunc=src_color one_minus_src_color
	}
}

shader_glass2
{
	cull=back
	layer0
	{
		map=glass.tga
		shininess=30
		specular=0.90,0.90,0.90
		diffuse=0.95,0.95,0.95
		ambient=0.13,0.13,0.13
		emission=0.13,0.13,0.13
		depthwrite=0 
		blendfunc=blend
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
		blendfunc=src_color one_minus_src_color
	}
}
;because the rearview mirror is useless in a truck
shader_reversecamera
{
  layer0
  {
    map=$mirror
    emission=0.8 0.8 0.8
  }
  layer1
  {
    map=reversecam.tga
    blendfunc=src_color one_minus_src_alpha
  }
}

;====================================
;Interior
;====================================
shader_carpet
{
	layer0
	{
		map=interior.tga
	}
}


;====================================
;End
;====================================