;===========================
; 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_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
{
  ; Tree fake their normals pointing up
  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
  }
}
;-------------------------------------------
vf_wave_flag
{
  vertex_shader 
  {
    file=standard_wave_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
;=========
; Shaders
;=========
;-------------------------------------------------

shader_bk_01~vf_sky
{
  sort_offset=2
  cull=none
  ;compression=0
  cast_shadow=0
  sky=1
  layer0
  {
    map=bk_01.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
    depthwrite=0
    depthfunc=always
  }
  layer1
  {
    map=sky_night.dds
    depthwrite=0
    depthfunc=always
  }
}

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

shader_track_01~vf_standard
{
  layer0
  {
    map=track_01.tga
  }
}
shader_fence_03~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=fence_03.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_bboard_01~vf_standard
{
  layer0
  {
    map=bboard_01.tga
  }
}

shader_box_05~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=box_05.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_box_01~vf_standard
{
  layer0
  {
    map=box_01.tga
  }
}

shader_box_04~vf_standard
{
  layer0
  {
    map=box_04.tga
  }
}

shader_bboard_02~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=bboard_02.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_fence_01~vf_standard
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=fence_01.tga
    shiniess=15
  }
}

shader_sand_02~vf_standard
{
  layer0
  {
    map=sand_02.tga
  }
}

shader_curb_01~vf_standard
{
  layer0
  {
    map=curb_01.tga
  }
}

shader_wall_01~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
	;cull=none
	layer0
	{
		map=wall_01.tga
	}
	layer1
	{
		map=wall_01_b.tga
    		mode=linear
	;subtle bump texture
	}
}

shader_grass_02~vf_standard
{
  layer0
  {
    map=grass_02.tga
  }
}

shader_track_02~vf_standard
{
  layer0
  {
    map=track_02.tga
  }
}

shader_track_05~vf_standard
{
  layer0
  {
    map=track_05.tga
  }
}

shader_sand_01~vf_standard
{
  layer0
  {
    map=sand_01.tga
  }
}

shader_grass_01~vf_standard
{
  layer0
  {
    map=grass_01.tga
  }
}

shader_track_04~vf_standard
{
  layer0
  {
    map=track_04.tga
  }
}

shader_tree_04~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=tree_04.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_fence_02~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=fence02.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_grada_02~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=grada02.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_grada_01~vf_standard_transparent
{
  cull=none
  cast_shadow=1
  layer0
  {
    map=grada01.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_tree_01~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=tree_01.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}

shader_tree_02~vf_x_tree
{
  cast_shadow=1
  layer0
  {
    map=tree_02.tga
    alpha_to_coverage=1
    alphafunc=gequal 128
  }
}