; Vertex/fragment templates
vf_standard
{
  ; Most-often used shader
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
vf_standard_transparent
{
  ; Shader for transparent (blended) materials
  ; Use this 
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_transparent_f.cg
  }
}
vf_vertexcolor
{
  ; Carlswood uses vertex coloring a lot in the grass. Other tracks may use 'standard_v.cg' and 'standard_f.cg' instead.
  vertex_shader 
  {
    file=standard_vc_v.cg
  }
  fragment_shader
  {
    file=standard_vc_f.cg
  }
}
vf_dyn_standard
{
  ; Dynamic objects (such as cones) with a default shader
  vertex_shader 
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
vf_road
{
  ; The road uses specularity but burned through the red channel to get a coarse gloss map
;  specular=1 1 1
;  shininess=4
;  scale=7.5
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
;    file=standard_detail_burn_a_f.cg
;     file=standard_burn_f.cg
    ; Burn specularity through alpha
    file=standard_burn_a_f.cg
  }
}
vf_bump
{
  vertex_shader
  {
    file=standard_bump_v.cg
;    file=standard_bump_detail_v.cg
;    file=dyn_standard_bump_reflect_v.cg
  }
  fragment_shader
  {
    file=standard_bump_f.cg
;    file=standard_bump_detail_f.cg
;    file=dyn_standard_bump_reflect_f.cg
  }
}
vf_reflect
{
 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_tree
{
  ; Tree fake their normals pointing up
  vertex_shader
  {
    file=standard_tree_v.cg
  }
  fragment_shader
  {
    file=standard_tree_f.cg
  }
}
vf_xtree
{
  ; Tree fake their normals pointing up
  vertex_shader
  {
    ;file=dyn_standard_v.cg
    file=standard_xtree_v.cg
  }
  fragment_shader
  {
    ;file=standard_f.cg
    file=standard_xtree_f.cg
    ; UV coordinates are bad (see http://www.racer.nl/tutorial/xtrees.htm)
    ;file=standard_xtree_f.cg
  }
}
vf_sky
{
  vertex_shader
  {
    ;file=sky_daynight_v.cg
    file=sky_v.cg
  }
  fragment_shader
  {
    ;file=sky_daynight_f.cg
    file=sky_f.cg
  }
}
;
; Shaders
;
; =============================================================================
; here there be shaders ...
; =============================================================================

shader_sky~vf_sky
{
;  compression=0
  sky=1
  fog=0
  cull=none
  layer0
  {
   map=sky.tga
   depthwrite=0
   depthfunc=always
  }
;  layer1
;  {
;   map=sky_night.tga
;   depthwrite=0
;   depthfunc=always
;  }
}
shader_autobcs~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=autobcs.bmp
  }
}
shader_cars~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cars.bmp
  }
}
shader_xgv1b~vf_standard
{
  tangents=1
  layer0
  {
    map=xgv1b.bmp
  }
}
shader_xgv1a~vf_standard
{
  tangents=1
  layer0
  {
    map=xgv1a.bmp
  }
}
shader_rd1a~vf_standard
{
  tangents=1
  layer0
  {
    map=rd1a.bmp
  }
}
shader_GRDRAIL1~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=GRDRAIL1.BMP
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_GRDRAIL2~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=GRDRAIL2.BMP
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_grasaa~vf_standard
{
  tangents=1
  layer0
  {
    map=grasaa.bmp
  }
}
shader_gomme8~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=gomme8.bmp
  }
}
shader_costone1~vf_standard
{
  tangents=1
  layer0
  {
    map=costone1.bmp
  }
}
shader_erbax3~vf_standard
{
  tangents=1
  layer0
  {
    map=erbax3.bmp
  }
}
shader_spon5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=spon5.bmp
  }
}
shader_spon7~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=spon7.bmp
  }
}
shader_gomme9~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=gomme9.bmp
  }
}
shader_SUGRETE1~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=SUGRETE1.BMP
    alpha_to_coverage=1
    alphafunc=greater 40
    wrap_t=clamp_to_edge
  }
}
shader_prtone07~vf_standard
{
  tangents=1
  layer0
  {
    map=prtone07.bmp
  }
}
shader_cartello~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cartello.bmp
  }
}
shader_rs1sug~vf_standard
{
  tangents=1
  layer0
  {
    map=rs1sug.bmp
  }
}
shader_rs1sugb~vf_standard
{
  tangents=1
  layer0
  {
    map=rs1sugb.bmp
  }
}
shader_rd1b~vf_standard
{
  tangents=1
  layer0
  {
    map=rd1b.bmp
  }
}
shader_prtone02~vf_standard
{
  tangents=1
  layer0
  {
    map=prtone02.bmp
  }
}
shader_fieno3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=fieno3.bmp
  }
}
shader_spon3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=spon3.bmp
  }
}
shader_spon4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=spon4.bmp
  }
}
shader_murone2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=murone2.bmp
  }
}
shader_airbag1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=airbag1.bmp
  }
}
shader_fieno1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=fieno1.bmp
  }
}
shader_trib4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trib4.bmp
  }
}
shader_ringhax1~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=ringhax1.BMP
    alpha_to_coverage=1
    alphafunc=greater 40
    wrap_t=clamp_to_edge
  }
}
shader_trib5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trib5.bmp
  }
}
;shader_grdrail2~vf_standard
;{
;  tangents=1
;  layer0
;  {
;    map=grdrail2.bmp
;  }
;}
shader_spon1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=spon1.bmp
  }
}
shader_rd1c~vf_standard
{
  tangents=1
  layer0
  {
    map=rd1c.bmp
  }
}
shader_towbas1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=towbas1.bmp
  }
}
shader_ppanel1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=ppanel1.bmp
  }
}
shader_inbox2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=inbox2.bmp
  }
}
shader_inbox1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=inbox1.bmp
  }
}
shader_inbox4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=inbox4.bmp
  }
}
shader_inbox3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=inbox3.bmp
  }
}
shader_edif1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=edif1.bmp
  }
}
shader_box9~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box9.bmp
  }
}
shader_box8~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box8.bmp
  }
}
shader_box7~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box7.bmp
  }
}
shader_box6~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box6.bmp
  }
}
shader_box5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box5.bmp
  }
}
shader_box4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box4.bmp
  }
}
shader_box3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box3.bmp
    alphafunc=gequal 100
  }
}
shader_box2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box2.bmp
  }
}
shader_box1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=box1.bmp
  }
}
shader_parcheg1~vf_standard
{
  tangents=1
  layer0
  {
    map=parcheg1.bmp
  }
}
shader_trib2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trib2.bmp
  }
}
shader_rd1d~vf_standard
{
  tangents=1
  layer0
  {
    map=rd1d.bmp
  }
}
shader_rd1strt~vf_standard
{
  tangents=1
  layer0
  {
    map=rd1strt.bmp
  }
}
shader_logomkln~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=logomkln.bmp
  }
}
shader_erbax4~vf_standard
{
  tangents=1
  layer0
  {
    map=erbax4.bmp
  }
}
shader_edif2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=edif2.bmp
  }
}
shader_rist2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=rist2.bmp
  }
}
shader_rist1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=rist1.bmp
  }
}
shader_pringh1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=pringh1.bmp
  }
}
shader_pantenn1~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=pantenn1.bmp
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_tow2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tow2.bmp
  }
}
shader_tow1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tow1.bmp
  }
}
shader_towspons~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=towspons.bmp
  }
}
shader_towwin3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=towwin3.bmp
  }
}
shader_towwin1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=towwin1.bmp
  }
}
shader_hoccono1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=hoccono1.bmp
  }
}
shader_distcrv2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=distcrv2.bmp
  }
}
shader_distcrv1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=distcrv1.bmp
  }
}
shader_arco1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=arco1.bmp
  }
}
shader_arco2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=arco2.bmp
  }
}
shader_arco3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=arco3.bmp
  }
}
shader_arco4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=arco4.bmp
  }
}
shader_arco5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=arco5.bmp
  }
}
shader_arco6~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=arco6.bmp
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_ppl23~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=ppl23.bmp
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_ppl13~vf_standard_transparent
{
  cast_shadow=1
   cull=none
   tangents=1
   layer0
  {
    map=ppl13.bmp
;    blendfunc=blend
    alpha_to_coverage=1
    alphafunc=greater 0
    depthwrite=1
  }
}
shader_kart2~vf_standard
{
  tangents=1
  layer0
  {
    map=kart2.bmp
    mipmap=0
  }
}
shader_kart1~vf_standard
{
  tangents=1
  layer0
  {
    map=kart1.bmp
    mipmap=0
  }
}
shader_trib1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trib1.bmp
  }
}
shader_trib3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trib3.bmp
  }
}
shader_podio3~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=podio3.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_podio2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=podio2.bmp
  }
}
shader_podio1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=podio1.bmp
  }
}
shader_tribtow5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tribtow5.bmp
  }
}
shader_tribtow1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tribtow1.bmp
  }
}
shader_tribtow4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tribtow4.bmp
  }
}
shader_tribtow3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tribtow3.bmp
  }
}
shader_tribtow2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tribtow2.bmp
  }
}
shader_s013~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=s013.bmp
  }
}
shader_semaf6~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=semaf6.bmp
  }
}
shader_semaf4~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=semaf4.bmp
  }
}
shader_semaf3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=semaf3.bmp
  }
}
shader_cabin4~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=cabin4.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_cabin3~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cabin3.bmp
  }
}
shader_cabin6~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cabin6.bmp
  }
}
shader_cabin5~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cabin5.bmp
  }
}
shader_cabin2~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cabin2.bmp
  }
}
shader_cabin1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=cabin1.bmp
  }
}
shader_tab1~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=tab1.bmp
  }
}
shader_pini1~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=pini1.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_fronda1~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=fronda1.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_quinta13~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=quinta13.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_quinta02~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=quinta02.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_pini2~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=pini2.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_alberi7~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=alberi7.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_quinta05~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  tangents=1
  layer0
  {
    map=quinta05.bmp
    alpha_to_coverage=1
    alphafunc=greater 100
    wrap_t=clamp_to_edge
  }
}
shader_trucks~vf_standard
{
  cast_shadow=1
  tangents=1
  layer0
  {
    map=trucks.tga
  }
}