;===========================
; 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=0.1 0.1 0.1
  shininess=80
  scale=7.5
  ;scale=3.1
  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_x_tree
{
	cull=none
	vertex_shader
	{
		file=standard_xtree_v.cg
	}
	fragment_shader
	{
		file=standard_xtree_f.cg
		;file=standard_xtree_basic_f.cg
	}
}
;-------------------------------------------------
vf_tree
{
	cull=none
	vertex_shader
	{
		file=standard_tree_v.cg
	}
	fragment_shader
	{
		file=standard_tree_f.cg
	}
}
;-------------------------------------------
vf_reflect
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
;-------------------------------------------
vf_reflect_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_mix1w
{
  ; Single texture, world mapped
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_mix1w_f.cg
  }
}
;-------------------------------------------
vf_mix2
{
  ; 2 textures, both world mapped
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_mix2_f.cg
  }
}
;-------------------------------------------
vf_mix2w
{
  ; 2 textures with world mapping for the 2nd texture
  vertex_shader 
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_mix2w_f.cg
  }
}
;-------------------------------------------
vf_glass
{
  vertex_shader
  {
    file=dyn_standard_reflect_window_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_window_f.cg
  }
  fresnel
  {
    bias=0.2
    scale=0.8
    power=3.0
  }
}
;-------------------------------------------
;
; Racer shaders
;

shader_bkaa~vf_sky
{
  sort_offset=-220
  cull=none
  compression=0
  cast_shadow=1
  layer0
  {
    diffuse=1 1 1 1
    map=bkaa.dds
    alphafunc=gequal 128
  }
}

shader_bkab~vf_sky
{
  sort_offset=-220
  cull=none
  compression=0
  cast_shadow=1
  layer0
  {
    diffuse=1 1 1 1
    map=bkab.dds
    alphafunc=gequal 128
  }
}

shader_bkad~vf_sky
{
  sort_offset=-220
  cull=none
  compression=0
  cast_shadow=1
  layer0
  {
    diffuse=1 1 1 1
    map=bkad.dds
    alphafunc=gequal 128
  }
}

shader_bkac~vf_sky
{
  sort_offset=-220
  cull=none
  compression=0
  cast_shadow=1
  layer0
  {
    diffuse=1 1 1 1
    map=bkac.dds
    alphafunc=gequal 128
  }
}

shader_sky~vf_sky
{
  sort_offset=-440
  sky=1
  cull=none
  layer0
  {
    map=SKY_snow.dds
    depthwrite=0
    depthfunc=always
  }
  layer1
  {
    map=sky_night.dds
    depthwrite=0
    depthfunc=always
  }
}

shader_blockfence2~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=blockfence2.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_blockfence1~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=blockfence1.dds
  }
}
shader_blockfence3~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=blockfence3.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_marshallcar~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=marshallcar.dds
    shiniess=14
  }
}

shader_spectator1~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators01.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators2~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators02.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators3~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators03.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators4~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators04.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators5~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators05.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators6~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators06.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_spectators7~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=spectators07.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_garbagea~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=garbagea.dds
	}
	layer1
	{
		map=GARBAGEA_B.DDS
    		mode=linear
	}
}

shader_garbagec~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=garbagec.dds
	}
	layer1
	{
		map=GARBAGEC_B.DDS
    		mode=linear
	}
}

shader_garbageb~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=garbageb.dds
	}
	layer1
	{
		map=GARBAGEB_B.DDS
    		mode=linear
	}
}

shader_garbaged~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=garbaged.dds
  }
}
shader_hs03~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=hs03.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_hs01~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=hs01.dds
  }
}
shader_hs02~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=hs02.dds
  }
}
shader_hstree~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=hstree.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_hs03windows~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=hs03.dds
  }
}
shader_hotelgate1~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=hotelgate1.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_hotelgate2~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=hotelgate2.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_hotelgate3~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=hotelgate3.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_strthutwill1~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=strthutwill1.dds
  }
}
shader_strthutwill3~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=strthutwill3.dds
  }
}
shader_strthutwill2~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=strthutwill2.dds
  }
}
shader_lppine01~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=lppine01.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_lppine03~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=lppine03.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_lppine05~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=lppine05.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_lppine04~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=lppine04.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}
shader_campingtenta~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=campingtenta.dds
	}
	layer1
	{
		map=CAMPINGTENT_B.DDS
    		mode=linear
	}
}

shader_campingtentb~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=campingtentb.dds
	}
	layer1
	{
		map=CAMPINGTENT_B.DDS
    		mode=linear
	}
}

shader_campingtentc~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=campingtentc.dds
	}
	layer1
	{
		map=CAMPINGTENT_B.DDS
    		mode=linear
	}
}

shader_campingtentd~vf_bump
{
	cast_shadow=1
	tangents=1
	ambient=0.5 0.5 0.5
	diffuse=1.0 1.0 1.0
	specular=0.1 0.1 0.1
	shininess=14
	layer0
	{
		map=campingtentd.dds
	}
	layer1
	{
		map=CAMPINGTENT_B.DDS
    		mode=linear
	}
}

shader_black~vf_standard
{
  layer0
  {
    map=black.dds
  }
}

shader_ptlit~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=ptlit04.dds
    alpha_to_coverage=1
    alphafunc=gequal 24
    emission=10 10 10
  }
}

shader_obj_pitlanelights~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=obj_pitlanelights.dds
    emission=2 2 2
  }
}

shader_metalrail~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=metalrail.dds
  }
}

shader_stlit~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=stlit04.dds
    alpha_to_coverage=1
    alphafunc=gequal 24
    emission=10 10 10
  }
}

shader_obj_startlights~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=obj_startlights.dds
    emission=2 2 2
  }
}

shader_grass0~vf_standard
{
  layer0
  {
    map=grass1.dds
  }
}

shader_roada12~vf_standard
{
  layer0
  {
    map=tarmac1a.dds
  }
}

shader_roada13~vf_standard
{
  layer0
  {
    map=tarmac1b.dds
  }
}

shader_rmbl8~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=wallbrick1b.dds
  }
}

shader_grass1~vf_standard
{
  layer0
  {
    map=grassrock1.dds
  }
}

shader_rmbl7~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=wallbrick1a.dds
  }
}

shader_rmbl11~vf_standard
{
  layer0
  {
    map=parking.dds
  }
}

shader_rmbl9~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=wallbrick1c.dds
  }
}

shader_grass6~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=rockedge4.dds
  }
}

shader_grass5~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=rockedge3.dds
  }
}

shader_grass4~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=rockedge2.dds
  }
}

shader_grass3~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=rockedge1.dds
  }
}

shader_roada14~vf_standard
{
  layer0
  {
    map=tarmac2.dds
  }
}

shader_tstandb~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tstandb.dds
  }
}

shader_tstandg~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tstandg.dds
  }
}

shader_tstande~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tstande.dds
  }
}

shader_tstandd~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tstandd.dds
  }
}

shader_tstandc~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tstandc.dds
  }
}

shader_tstandf~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=tstandf.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_tstanda~vf_standard_transparent
{
  cast_shadow=1
  layer0
  {
    map=tstanda.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_tentgarwill~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=tentgarwill.dds
  }
}

shader_forest~vf_tree
{
  cast_shadow=1
  layer0
  {
    map=forest.dds
    alpha_to_coverage=1
    alphafunc=gequal 128
    wrap_t=clamp_to_edge
  }
}