; Vertex/fragment templates
;
vf_standard
{
  ; Most-often used shader for static objects
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_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_standard_transparent
{
  ; Shader for transparent (blended) materials
  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_animate
{
  ; Animation test (top moves around)
  vertex_shader 
  {
    file=animate_test_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
    ; Burn specularity through alpha
    ;file=standard_burn_a_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
  }
}
vf_bump
{
  vertex_shader
  {
    file=standard_bump_v.cg
  }
  fragment_shader
  {
    file=standard_bump_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
  }
}

;
; Racer shaders
;
shader_barrier~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=barrier.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_cone~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=cone.tga
  }
}
shader_block~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=block.tga
  }
}
shader_cliff~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=cliff.tga
  }
}
shader_conc2~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=conc2.tga
  }
}
shader_conc3~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=conc3.tga
  }
}
shader_concdam~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=damconc.tga
  }
}
shader_damwater~vf_standard
{
  layer0
  {
    map=damwater.tga
	emission=0.1 0.1 0.1 0.1
	reflect=1
	mipmap=0
  }
}
shader_turnsign~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=turnsign.tga
	emission=0.2 0.2 0.2 0.2
  }
}
shader_signback~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=signback.tga
  }
}
shader_pole~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=pole.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_warning~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=warning.tga
    ; Map has transparency so enable blending
    alpha_to_coverage=1
    alphafunc=gequal 128
    ; Real blending
    ;blendfunc=blend
    ;depthwrite=0
  }
}
shader_fence1~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=fence1.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_grasmnt2~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=grasmnt2.tga
  }
}
shader_grasstrack~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=grasstrack.tga
  }
}
shader_grass~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=grass.tga
  }
}
shader_grasstrack2~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=trans4.tga
  }
}
shader_gravel~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=gravel.tga
  }
}
shader_gravel10~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=trans2.tga
  }
}
shader_gravelg_m~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=gravelg_m.tga
  }
}
shader_gravel4~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=trans6.tga
  }
}
shader_gravel5~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=trans5.tga
  }
}
shader_gravel9~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=trans3.tga
  }
}
shader_gravel_m~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=gravelg_m.tga
  }
}
shader_hedge~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=hedge.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_lonetree~vf_xtree
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=lonetree.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
    wrap_t=clamp_to_edge
  }
}
shader_lonetree2~vf_xtree
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=lonetree2.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
	wrap_t=clamp_to_edge
  }
}
shader_mountain~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=mountain.tga
  }
}
shader_pave~vf_standard
{
  layer0
  {
    map=pave.tga
  }
}
shader_road1~vf_standard
{
  layer0
  {
    map=rd_plain.tga
  }
}
shader_road2~vf_standard
{
  layer0
  {
    ;map=rd_solid.tga
    map=rd_plain.tga
  }
}
shader_sky~vf_standard
{
  layer0
  {
    map=sky1.tga
  }
}
shader_slow~vf_standard_transparent
{
  layer0
  {
    map=slow.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_telepost~vf_standard_transparent
{
  cast_shadow=1
  cull=none
  layer0
  {
    map=telepost.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
;shader_multisub (has no texture)
shader_trans1~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=grass_mount.tga
  }
}
shader_grasclif~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=grasclif.tga
  }
}
shader_clifmnt~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=clifmnt.tga
  }
}
shader_tree~vf_xtree
{
  cast_shadow=1
  layer0
  {
    map=tree.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_treewall1~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=treewall1.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_treewall2~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=treewall2.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_tunnel~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tunnel.tga
  }
}
shader_damconc~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=damconc.tga
  }
}
shader_water~vf_standard
{
  layer0
  {
    map=water.tga
	shininess=20
	emission=0.1 0.1 0.1 0.1
	mipmap=0
  }
}
shader_banner~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
  map=banner.tga
  alpha_to_coverage=1
  alphafunc=gequal 128
  }
}
shader_rope~vf_standard_transparent
{
 cull=none
  cast_shadow=1
 layer0
  {
  map=rope.tga
  alpha_to_coverage=1
  alphafunc=gequal 128
  }
}
shader_tower~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tower.tga
  }
}