;
; V/f shaders
;

; GPU Shader templates
;
vf_standard
{
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
vf_standard_transparent
{
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_transparent_f.cg
  }
}
vf_detail
{
  ; Detail texture
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_detail_f.cg
  }
}
vf_bump
{
  ; Detail texture
  vertex_shader 
  {
    file=standard_bump_v.cg
  }
  fragment_shader
  {
    file=standard_bump_f.cg
  }
}
vf_road
{
  ; The road uses specularity but burned through the red channel to get a coarse gloss map
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    ; Burn specularity through alpha
    ;file=standard_burn_a_f.cg
    file=standard_detail_burn_a_f.cg
  }
  specular=1 1 1
  shininess=10
}
vf_wave
{
  ; Detail texture
  vertex_shader 
  {
    file=standard_wave_v.cg
  }
  fragment_shader
  {
    file=standard_transparent_f.cg
  }
}
vf_wave_banner
{
  ; Detail texture
  vertex_shader 
  {
    file=standard_wave_banner_v.cg
  }
  fragment_shader
  {
    file=standard_transparent_f.cg
    ;file=standard_f.cg
  }
}
vf_tree
{
  ; Detail texture
  vertex_shader 
  {
    file=standard_tree_v.cg
  }
  fragment_shader
  {
    file=standard_tree_f.cg
  }
}
vf_reflect
{
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_reflect_f.cg
  }
}

;
; Racer shaders
;
shader_shadow~vf_standard
{
  
  layer0
  {
    map=shadow.tga
    blendfunc=blend
  }
}
shader_cow~vf_standard
{
  layer0
  {
    map=vache.tga
  }
}
shader_pot~vf_standard
{
  layer0
  {
    map=pot.tga
  }
}
shader_flag~vf_wave
{
  layer0
  {
    map=flag.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_route~vf_road
{
  shininess=20
  scale=11.5
  layer0
  {
    map=road.tga
  }
  ; Obsolete layers
  layer1
  {
    map=road-add.tga
  }
}

shader_chalet1~vf_standard
{
  layer0
  {
    map=chalet1.tga
    mipmap=1
  }
}

shader_chalet2~vf_standard
{
  layer0
  {
    map=chalet2.tga
    mipmap=1
  }
}

shader_chalettoit~vf_standard
{
  layer0
  {
    map=chalettoit.tga
  }
}

shader_pierre~vf_standard
{
  layer0
  {
    map=chaletmur.tga
  }
}

shader_murpierre~vf_bump
{
  layer0
  {
    map=mur-pierre.tga
  }
  layer1
  {
    map=mur-pierre_bump.tga
  }
}
shader_murmont~vf_standard
{
  layer0
  {
    map=murmont.tga
  }
}

shader_pubback~vf_standard
{
  layer0
  {
    map=pubback.tga
  }
}
shader_pub1~vf_standard
{
  layer0
  {
    map=pub1.tga
  }
  Xlayer1
  {
    map=$tracksunmap
  }
}

shader_pub2~vf_standard
{
  shininess=30
  specular=1 1 1
  layer0
  {
    map=pub2.tga
  }
}

shader_pub3~vf_standard
{
  layer0
  {
    map=pub1.tga
  }
}

shader_pub4
{
  layer0
  {
    map=pub4.tga
  }
}

shader_herbe1~vf_standard_transparent
{
  cull=none
  layer0
  {
    map=herbe1.tga
    ;blendfunc=blend
    alphafunc=gequal 110
    alpha_to_coverage=1
    wrap_t=clamp
    ;depthwrite=1
  }
}

shader_barriere~vf_reflect
{
  cull=none
  layer0
  {
    map=barriere.tga
    ;blendfunc=blend
    alphafunc=gequal 100
  }
  layer1
  {
    ;map=$trackenvmap
    map=$tracksunmap
  }
}

shader_bar_sup~vf_standard_transparent
{
  cull=none
  layer0
  {
    map=bar_sup.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 100
    ;mipmap=0
    depthwrite=1
  }
}

shader_ban~vf_wave_banner
{
  layer0
  {
    map=banniere.tga
    blendfunc=blend
    alphafunc=gequal 150
    ;mipmap=0
  }
}

shader_pz~vf_standard_transparent
{
  layer0
  {
    map=p-z.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_panim~vf_standard_transparent
{
  layer0
  {
    map=p-anim.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_pvache~vf_standard_transparent
{
  layer0
  {
    map=p-vache.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_pdroite~vf_standard_transparent
{
  layer0
  {
    map=p-droite.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
  }
}
shader_pchute~vf_standard_transparent
{
  diffuse=1.5 1.5 1.5
  layer0
  {
    map=p-chute.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_pgauche~vf_standard_transparent
{
  layer0
  {
    map=p-gauche.tga
    blendfunc=blend
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_pbosse~vf_standard_transparent
{
  layer0
  {
    map=p-bosse.tga
    blendfunc=blend
    alphafunc=gequal 200
    mipmap=1
  }
}
shader_pback~vf_standard_transparent
{
  layer0
  {
    map=p-back.tga
    blendfunc=blend
    alphafunc=gequal 200
    mipmap=1
  }
}

shader_bordroute~vf_detail
{
  scale=7.5
  layer0
  {
    map=bord_route.tga
    ;mipmap=0
    ;blendfunc=blend
  }
  layer1
  {
    map=gazon-add.tga
  }
}

shader_montagne1~vf_detail
{
  scale=7.5
  layer0
  {
    map=mont1.tga
  }
  layer1
  {
    map=gazon-add.tga
  }
}

shader_bord~vf_detail
{
  scale=12.5
  layer0
  {
    map=gazon.tga
  }
  layer1
  {
    map=gazon-add.tga
  }
}

shader_alphorn~vf_standard_transparent
{
  layer0
  {
    map=alphorn.tga
    blendfunc=blend
    alphafunc=gequal 150
    ;mipmap=0
  }
}

shader_sapin1~vf_tree
{
  layer0
  {
    map=sapin2.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 170
    ;mipmap=0
    ;depthwrite=1
  }
}

shader_sapin2~vf_tree
{
  layer0
  {
    map=sapin.tga
    alpha_to_coverage=1
    ;blendfunc=blend
    alphafunc=gequal 170
    ;mipmap=0
    ;depthwrite=1
  }
}

shader_collide~vf_tree
{
  layer0
  {
    map=sapin2.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 150
    ;mipmap=1
    depthwrite=1
  }
}

shader_arbremort~vf_tree
{
  cull=none
  layer0
  {
    map=arbre-mort.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 150
    ;mipmap=0
    ;depthwrite=1
  }
}

shader_sapinline~vf_tree
{
  cull=none
  layer0
  {
    map=sapin-line.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 200
    ;mipmap=0
    ;depthwrite=1
  }
}

shader_montagnedeco1~vf_standard_transparent
{
  sky=1
  sort_offset=1
  layer0
  {
    map=montagne.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 150
    ;mipmap=1
  }
}

shader_montagnedeco2~vf_standard_transparent
{
  sky=1
  sort_offset=2
  layer0
  {
    map=montagne2.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 150
  }
}

shader_buisson1~vf_tree
{
  cull=none
  layer0
  {
    map=buisson1.tga
    alpha_to_coverage=1
    ;blendfunc=blend
    alphafunc=gequal 110
    ;mipmap=1
    ;depthwrite=1
  }
}

shader_buisson2~vf_tree
{
  cull=none
  layer0
  {
    map=buisson2.tga
    ;blendfunc=blend
    alpha_to_coverage=1
    alphafunc=gequal 110
    ;mipmap=1
    ;depthwrite=1
  }
}

shader_panorama2~vf_standard
{
  sky=1
  fog=0
  layer0
  {
    texenv=replace
    map=panorama2.tga
    cull=back
    depthfunc=always
    depthwrite=1
  }
}
