;
; Vertex/fragment shader templates
;

vf_bump
{
	vertex_shader
	{
		file=dyn_standard_bump_v.cg
	}
	fragment_shader
	{
		file=dyn_standard_bump_f.cg
	}
}

vf_reflect
{
	vertex_shader
	{
		file=dyn_standard_reflect_v.cg
	}
	fragment_shader
	{
		file=dyn_standard_reflect_f.cg
	}
}

vf_standard
{
	vertex_shader
	{
		file=dyn_standard_v.cg
	}
	fragment_shader
	{
		file=standard_f.cg
	}
}

vf_transparent
{
	vertex_shader
	{
		file=dyn_standard_reflect_window_v.cg
	}
	fragment_shader
	{
		file=dyn_standard_reflect_window_f.cg
	}
}

; materials_________________________________________________

shader_rx8_01~vf_reflect
{
	sort_offset=0
	cast_shadow=1
	compression=0
	reflect=0.65
	shininess=24
	specular=0.00 0.00 0.00
  	mipmap_bias=3
  	fresnel
  	{
	     bias=0.1
	     power=4.0
    		scale=0.9
  	}
	layer0
	{
		map=Tex\rx8_01.dds
	}
	layer1
	{
		map=$trackenvmap
	}
}

shader_rx8_01_m~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=Tex\rx8_01.dds
    shininess=34
  }
}

shader_rx8_02~vf_standard
{
	cast_shadow=1
	layer0
	{
		map=Tex\rx8_02.dds
		;texenv=replace
	}
}

shader_rx8_03_plate~vf_standard
{
  layer0
  {
    map=Tex\rx8_03.dds
	alpha_to_coverage=1
	blendfunc=blend
  }
}

shader_rx8_03~vf_transparent
{
	sort_offset=1
	cast_shadow=1
	reflect=0.85
	layer0
	{
		map=Tex\rx8_03.dds
		blendfunc=blend
	}
	layer1
	{
		map=$trackenvmap
	}
}

shader_rx8_04~vf_standard
{
	cast_shadow=1
	layer0
	{
		map=Tex\rx8_04.dds
	}
}
shader_rx8_01_l~vf_reflect
{
	cast_shadow=1
	compression=0
	reflect=0.65
	shininess=32
	specular=1.00 1.00 1.00
	layer0
	{
		map=Tex\rx8_01.dds
	}
	layer1
	{
		map=$trackenvmap
	}
}

shader_brakes
{
  cast_shadow=1
  ; Brake disc
  layer0
  {
    map=Tex\brakes.dds
    emission=0 0 0 1
    shininess=20
    specular=1 1 1 1
  }
  ; Brakedisc heat shader
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    ; Burn heat through texture's alpha
    file=standard_heat_f.cg
  }
}

shader_rx8_03_b~vf_reflect
{
	sort_offset=2
	cast_shadow=0
	compression=0
	reflect=0.65
	shininess=32
	specular=1.00 1.00 1.00
	layer0
	{
		map=Tex\rx8_03.dds
		alpha_to_coverage=1
        blendfunc=blend
		depthwrite=0
	}
	layer1
	{
		map=$trackenvmap
	}
}

shader_rx8_03_bl~vf_reflect
{
	cast_shadow=0
	layer0
	{
		map=Tex\rx8_03.dds
		alpha_to_coverage=1
		blendfunc=blend
		emission=60 60 60 1
		;texenv=replace
	}
}

shader_maledriver~vf_standard
{
  cast_shadow=1
  layer0
  {
    map=Tex\maledriver.tga
    emission=.1 .1 .1 .1
  }
}

shader_rpm~vf_standard
{
  layer0
  {
    map=Tex\rpm.tga
    emission=.1 .1 .1 .1
  }
}

shader_tire01_rim~vf_reflect
{
	cast_shadow=1
	compression=0
	reflect=0.20
	shininess=10
	specular=0.10 0.10 0.10
	layer0
	{
		map=Tex\tire01.dds
	}
	layer1
	{
		map=$trackenvmap
	}
}

shader_tire01_tread~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 ;0.3 0.3 0.3
	shininess=24
	;cull=none
	layer0
	{
		map=Tex\tire01.dds
	}
	layer1
	{
		map=Tex\tire01_b1.dds
    		mode=linear
	;subtle bump texture
	}
}