;
; Vertex/fragment shader templates
;
vf_reflect
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}

vf_reflect_spec
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_glass
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_window_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_window_f.cg
  }
}

vf_chrome
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_reflect_bump
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_bump
{
  ; Texture+bumpmap+reflection map
  vertex_shader
  {
    file=dyn_standard_bump_reflect_v.cg
    ;file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_bump_reflect_f.cg
    ;file=dyn_standard_reflect_f.cg
  }
}

vf_detail_bump
{ 
  ; Texture+bumpmap+reflection map
  vertex_shader
  {
    ;file=cg/dyn_standard_bump_detail_v.cg
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    ;file=cg/dyn_standard_bump_detail_f.cg
    file=dyn_standard_reflect_f.cg
  }
}

vf_standard
{
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}

vf_heat
{
;Brake disc heat shader
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_brakeheat_f.cg
  }
}

vf_standard_spec
{
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
;;;;;;;;START CAR SHADERS;;;;;;;;;

shader_vopsea~vf_reflect_bump
{
  compression=0
  reflect=0.5
  specular=1 1 1
  shininess=50
  ; Need tangents passed while rendering
  tangents=1
  layer0
  {
    map=vopsea.tga
    ;blend=src_alpha one_minus_src_alpha
  }
  layer1
  {
    ; Bumpmap
    map=bodycolorM.tga
  }
  layer2
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
;mirror----------------------------------------------------------------------------
shader_mirror~vf_standard
{	
  layer0
   {
     map=$mirror
     texscale_s=1
     texscale_r=1
     texscale_t=1
     emission=0.3 0.3 0.3 1
   }
}

shader_windows~vf_reflect
{
;was using dyn_reflect_window.cg - shader is buggy ATM (Racer 088)
;temporarily using chrome shader - no fresnel
sort_offset=1
;sort offset needed, otherwise glass hides lit headlamp models..
reflect=1.0
diffuse=1.0 1.0 1.0
ambient=1.0 1.0 1.0
;cull=none
layer0
{
  map=windows.tga
  shininess=20
  blendfunc=blend
  specular=0.0 0.0 0.0 1.0 
  depthwrite=0
 }
 layer1
  {
   map=$trackenvmap
   depthwrite=0
   }
}

;---------------------------------------------------------------------------------

shader_nodamage_lod0
{
  layer0
  {
    map=nodamage_lod0.tga
  }
}

shader_lights_lod0 
{
  layer0
  {
    map=lights_lod0.tga
  }
}

shader_grille2_alpha
{
  layer0
  {
    map=grille2_alpha.tga
  }
}

shader_interior_lod0
{
  layer0
  {
    map=interior_lod0.tga
  }
}

shader_gri
{
  layer0
  {
    map=gri.tga
  }
}


shader_wood
{
  layer0
  {
    map=wood.tga
  }
}

shader_undercarriage
{
  layer0
  {
    map=undercarriage.tga
  }
}

shader_bumper_frame
{
  layer0
  {
    map=bumper_frame.tga
  }
}

shader_154c6538 
{
  layer0
  {
    map=154c6538.tga
  }
}

shader_engine
{
  layer0
  {
    map=engine.tga
  }
}


;tire&wheel-------------------------------------------------------------------------

shader_bridgestonepro128
{
  layer0
  {
    map=bridgestonepro128.tga
  }
}

shader_tirea0
{
  layer0
  {
    map=tirea0.tga
  }
}

shader_tx_w221_03
{
  layer0
  {
    map=tx_w221_03.tga
  }
}

shader_wheel_lod0
{
  layer0
 {
 map=wheel_lod0.tga
 shininess=45
 specular=0.8 0.8 0.8
 mipmap=0
  }
}

shader_symbolmetal
{
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
      shininess=32
      specular=1 1 1 1
  }
  layer1
  {
    map=chrome.tga
    blendfunc=one src_alpha
    shininess=32
    specular=0.36 0.35 0.34
  }
}

shader_wheelbody
{
	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
                        emission=0.65 0.65 0.65
		shininess=48
		specular=0.4 0.4 0.4
		blendfunc=filter
	}
	layer2
	{
		map=wheelbody.tga
		blendfunc=one src_alpha
                        shininess=48
                        specular=0.4 0.4 0.4
	}
}

shader_MBtire0
{
  layer0
  {
    map=MBtire0.tga
    mipmap=0
  }
}

shader_MBtire1
{
  layer0
  {
    map=MBtire1.tga
    mipmap=0
  }
}

shader_baer
{
  layer0
  {
   map=baer.tga
   shininess=42
   specular=0.8 0.8 0.8
   mipmap=0
  }
}

shader_baer1
{
  layer0
  {
    map=baer1.tga
   shininess=42
   specular=0.8 0.8 0.8
   mipmap=0
  }
}


;brake&lights-----------------------------------------------------------------------
shader_lights_lod0frana
{
	sort_offset=1
 	layer0
	{
		map=lights_lod0frana.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}
}

shader_interior_lod0on
{
	sort_offset=1
 	layer0
	{
		map=interior_lod0on.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}
}

shader_lights_lod0pozitie
{
	sort_offset=1
 	layer0
	{
		map=lights_lod0pozitie.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}
}

shader_alb
{
	sort_offset=1
 	layer0
	{
		map=alb.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}
}

shader_ecrankm
{
	sort_offset=1
 	layer0
	{
		map=ecrankm.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}
}

shader_ecran
{
	sort_offset=1
 	layer0
	{
		map=tx_w221_02.tga
		blendfunc=blend
		texenv=replace
		emission=1 1 1 1
	}

;
