; Vertex/fragment shader templates
;
{
  ; Specular control using the diffuse's alpha channel
  vertex_shader
  {
    file=dyn_standard_bump_speca_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_bump_speca_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_reflect_v.cg
    ;file=dyn_standard_bump_speca_v.cg
    file=dyn_standard_bump_reflect_v.cg
  }
  fragment_shader
  {
    ;file=dyn_standard_reflect_f.cg
    ;file=dyn_standard_bump_speca_f.cg
    file=dyn_standard_bump_reflect_f.cg
  }
}
vf_reflect_window
{
cast_shadow=1
  fresnel
  {
    bias=0.06
    scale=0.98
    power=2
  }
  vertex_shader
  {
    file=dyn_standard_reflect_window_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_window_f.cg
  }
}
vf_standard
{
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}
vf_bump
{
  vertex_shader
  {
    file=dyn_standard_bump_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_bump_f.cg
  }
}
 shader_brim1~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=brim1.tga
}
layer1
{
map=$trackenvmap
}
}
shader_btire2~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=btire2.tga
}
layer1
{
map=$trackenvmap
}
}
shader_btire3~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=btire3.tga

}
layer1
{
map=$trackenvmap
}
}
shader_wheel~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=wheel.tga
}
layer1
{
map=$trackenvmap
}
}
shader_s65tex3~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=s65tex3.tga
}
layer1
{
map=$trackenvmap
}
}
shader_rim0~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=rim0.tga
}
layer1
{
map=$trackenvmap
}
}
shader_rim1~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=rim1.tga
}
layer1
{
map=$trackenvmap
}
}
shader_brake~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=brake.tga
}
layer1
{
map=$trackenvmap
}
}
shader_caliper~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=caliper.tga
}
layer1
{
map=$trackenvmap
}
}
shader_chrome~vf_reflect
{
compression=0
ambient=0.1 0.1 0.1
diffuse=0.1 0.1 0.1
specular=0.1 0.1 0.1 ; no specular for solid colours
shininess=16
reflect=1 ;max reflect, for chrome - bodge with modded dyn_reflect shader
sort_offset=1
compression=0
layer0
{
map=chrome.tga
}
layer1
{
; Reflection cubemap
map=$trackenvmap
}
}
shader_body~vf_reflect
{
cast_shadow=1
cull=none
compression=0
reflect=0.3
shininess=15
diffuse=0.5 0.5 0.5 1
ambient=1 1 1 1
specular=0 0 0 1
fresnel
{
bias=0.05
power=2.0
scale=1.0
}
layer0
{
map=body.tga
}
layer1
{
map=$trackenvmap
}
}




































































































































;;S65AMG Shader Created by Napier;;

;body-----------------------------------------------------------------------------

shader_body
{
 layer0
 {
  map=fresnel.tga
  texgen_s=sphere_map
  texgen_t=sphere_map
  emission=0.7 0.7 0.7
  mipmap=0
 }
 layer1
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  ;emission=0.5 0.5 0.5
  blendfunc=filter
  shininess=16
  specular=0.7 0.7 0.7
 }
 layer2
 {
  map=$tracksunmap
  texgen_s=sphere_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one
  shininess=16
  specular=0.7 0.7 0.7
 }
 layer3
 {
  map=body.tga
  blendfunc=one src_alpha
  mipmap=0
 }
}



;metalbody--------------------------------------------------------------------

shader_chrome
{
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    shininess=48
    specular=1 1 1 1
  }
  layer1
  {
    map=chrome.tga
    blendfunc=one src_alpha
  shininess=52
  specular=0.5 0.5 0.52
  }
}

;----------------------------------------------

shader_black
{
 layer0
 {
  map=black.tga
   }
}

shader_under
{
  layer0
  {
    map=under.tga
   }
 }

shader_s65tex
{
  layer0
  {
    map=s65tex.tga
   }
 }

shader_grill
{
  layer0
  {
    map=grill.tga
   }
 }

shader_plate_JP
{
  layer0
  {
    map=plate_JP.tga
    mipmap=0
    shininess=10
    specular=0.3 0.3 0.3 1
   }
 }

shader_plate_EU
{
  layer0
  {
    map=plate_EU.tga
    mipmap=0
    shininess=10
    specular=0.3 0.3 0.3 
   }
 }

shader_lights
{
 sort_offset=1
 fog=0
 layer0
 {
  map=black.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer1
 {
  map=lights.tga
  mipmap=0
 }
}

shader_s65tex1
{
	layer0
	{
		map=gradient.tga
		texgen_s=sphere_map
		texgen_t=sphere_map
		emission=.6 .6 .6 .6
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
                        emission=0.65 0.65 0.65
		shininess=22
		specular=0.35 0.35 0.35
		blendfunc=filter
	}
	layer2
	{
		map=s65tex1.tga
		blendfunc=one src_alpha
                        shininess=20
                        specular=0.2 0.2 0.2
	}
}


;windows--------------------------------------------------------------------------

shader_windows
{
  sort_offset=1
  layer0
  {
   map=windows.tga
   blendfunc=blend
   mipmap=0
   depthwrite=0
  }
  layer1
  {
   map=$trackenvmap
   texgen_s=reflection_map
   texgen_t=reflection_map
   texgen_r=reflection_map
   blendfunc=src_color one
   depthwrite=0
   shininess=18
   specular=0.55 0.55 0.55
    }
}

shader_glass
 {
  sort_offset=1
  layer0
  {
   map=glass.tga
   blendfunc=blend
   mipmap=0
   depthwrite=0
  }
  layer1
  {
   map=$trackenvmap
   texgen_s=reflection_map
   texgen_t=reflection_map
   texgen_r=reflection_map
   blendfunc=src_color one
   depthwrite=0
   shininess=18
   specular=0.55 0.55 0.55
  }
}

shader_lights_glass
{
  sort_offset=0
  ;layer0
  {
   map=black.tga
   blendfunc=one src_alpha
   depthwrite=0
  }
  layer0
  {
   map=lights_glass.tga
   ;blendfunc=blend
   blendfunc=src_color one_minus_src_alpha
   mipmap=0
   depthwrite=0
  }
  layer1
  {
   map=fresnel.tga
   texgen_s=sphere_map
   texgen_t=sphere_map
   blendfunc=src_color one
   depthwrite=0
  }
  layer2
  {
   map=$trackenvmap
   texgen_s=reflection_map
   texgen_t=reflection_map
   texgen_r=reflection_map
   blendfunc=src_color one
   depthwrite=0
   emission=-0.7 -0.7 -0.7
  }
  layer3
  {
   map=lights_glass.tga
   blendfunc=blend
   mipmap=0
   depthwrite=0
  }
}

;wheel&tire-------------------------------------------------------------------------

shader_tire
{
  layer0
  {
    map=tire.tga
    mipmap=0
  }
}

shader_tire1
{
  layer0
  {
    map=tire1.tga
    mipmap=0
  }
}

shader_caliper
{
 layer0
 {
  map=caliper.tga
  shininess=10
  specular=0.3 0.3 0.3
  mipmap=0
  }
}


shader_rim0
{
  layer0
  {
    map=gradient.tga
    texgen_s=sphere_map
    texgen_t=sphere_map
    emission=1. 1. 1. 1.
  }
  layer1
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    emission=0.65 0.65 0.65
    shininess=20
    specular=0.3 0.3 0.3
    blendfunc=filter
  }
  layer2
  {
    map=rim0.tga
    blendfunc=one src_alpha
    shininess=22
    specular=0.3 0.3 0.3
  }
}

shader_rim1
{
  layer0
  {
    map=gradient.tga
    texgen_s=sphere_map
    texgen_t=sphere_map
    emission=1. 1. 1. 1.
  }
  layer1
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    emission=0.65 0.65 0.65
    shininess=20
    specular=0.3 0.3 0.3
    blendfunc=filter
  }
  layer2
  {
    map=rim1.tga
    blendfunc=one src_alpha
    shininess=22
    specular=0.3 0.3 0.3
  }
}

shader_wheel
{
 layer0
 {
  map=wheel.tga
  shininess=10
  specular=0.3 0.3 0.3
  mipmap=0
  }
}

;brakes&lights-----------------------------------------------------------------------

shader_brake
{
 sort_offset=-5
 fog=0
 ;layer0
 {
  map=black.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer0
 {
  map=brake.tga
  blendfunc=blend
  depthwrite=0
  emission=2 1 1 1
  mipmap=0
 }
}

shader_brake
{
 sort_offset=-5
 fog=0
 ;layer0
 {
  map=black.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer0
 {
  map=brake.tga
  blendfunc=blend
  depthwrite=0
  emission=1 1 1
  mipmap=0
 }
}

shader_lights1
{
  sort_offset=1
  layer0
    {
       map=lights1.tga
       blendfunc=add
       texenv=replace
       emission=4 4 4 1
    }
}

shader_lights2
{
  sort_offset=1
  layer0
    {
       map=lights2.tga
       blendfunc=add
       texenv=replace
       emission=1 1 1 1
    }
}

shader_lights3
{
  sort_offset=0
  layer0
    {
       map=lights3.tga
       blendfunc=add
       texenv=replace
       emission=1 1 1 1
    }
}

shader_lights4
{
 sort_offset=-6
 fog=0
 layer0
 {
  map=lights4.tga
  emission=1 1 1 1
  depthwrite=0
  blendfunc=dst_color one
  texgen_s=sphere_map
 }
 layer2
 {
  map=lights4.tga
  emission=1 1 1 1
  depthwrite=0
  blendfunc=dst_color one
  texgen_s=sphere_map
 }
}

shader_lights5
{
  sort_offset=0
  layer0
    {
       map=lights5.tga
       blendfunc=add
       texenv=replace
       emission=1 1 1 1
    }
}

shader_re
{
  sort_offset=0
  layer0
    {
       map=re.tga
       blendfunc=add
       texenv=replace
       emission=3 3 3 1
    }
}

;mirror---------------------------------------------------------------------------------

shader_mirror
{
  layer0
    {
       map=$mirror
       texscale_s=1
       texscale_r=1
       texscale_t=1
       emission=0.3 0.3 0.3 1
    }
}

shader_b_mirror
{
  layer0
    {
       map=$mirror
       texscale_s=1
       texscale_r=1
       texscale_t=-1
       emission=0.3 0.3 0.3 1
    }
}


;blur_tire---------------------------------------------------------------------------------

shader_btire
{
  layer0
  {
    map=btire.tga
    mipmap=0
  }
}

shader_btire1
{
  layer0
  {
    map=btire1.tga
    mipmap=0
  }
}

shader_btire2
{
  layer0
  {
    map=btire2.tga
    mipmap=0
  }
}

shader_btire3
{
  layer0
  {
    map=btire3.tga
    mipmap=0
  }
}

;blur_rim---------------------------------------------------------------------------------

shader_brim
{
 sort_offset=0
 layer0
 {
  map=brim.tga
  mipmap=0
  blendfunc=blend
 }
 layer1
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one 
  emission=1 1 1
 }
 layer2
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one 
  emission=-0.5 -0.5 -0.5
 }
 layer3
 {
  map=$tracksunmap
  texgen_s=sphere_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one
  shininess=24
  specular=1 1 1 1
 }
}

shader_brim1
{
 sort_offset=0
 layer0
 {
  map=brim1.tga
  mipmap=0
  blendfunc=blend
 }
 layer1
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one 
  emission=1 1 1
 }
 layer2
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one 
  emission=-0.5 -0.5 -0.5
 }
 layer3
 {
  map=$tracksunmap
  texgen_s=sphere_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=dst_color one
  shininess=24
  specular=1 1 1 1
 }
}

shader_s65tex2
{
	layer0
	{
		map=gradient.tga
		texgen_s=sphere_map
		texgen_t=sphere_map
		emission=.6 .6 .6 .6
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
                        emission=0.65 0.65 0.65
		shininess=22
		specular=0.35 0.35 0.35
		blendfunc=filter
	}
	layer2
	{
		map=s65tex2.tga
		blendfunc=one src_alpha
                        shininess=20
                        specular=0.2 0.2 0.2
	}
}

shader_s65tex3
{
	layer0
	{
		map=gradient.tga
		texgen_s=sphere_map
		texgen_t=sphere_map
		emission=.6 .6 .6 .6
	}
	layer1
	{
		map=$trackenvmap
		texgen_s=reflection_map
		texgen_t=reflection_map
		texgen_r=reflection_map
                        emission=0.65 0.65 0.65
		shininess=22
		specular=0.35 0.35 0.35
		blendfunc=filter
	}
	layer2
	{
		map=s65tex3.tga
		blendfunc=one src_alpha
                        shininess=20
                        specular=0.2 0.2 0.2
	}
}



