;
; Vertex/fragment shader templates
;
vf_reflect
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}

vf_reflect_spec
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_glass
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_window_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_window_f.cg
  }
}

vf_chrome
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_reflect_bump
{
  ; Just reflection
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_bump
{
  vertex_shader
  {
    file=dyn_standard_bump_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_bump_f.cg
  }
}

vf_detail_bump
{ 
  ; Texture+bumpmap+reflection map
  vertex_shader
  {
    ;file=cg/dyn_standard_bump_detail_v.cg
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    ;file=cg/dyn_standard_bump_detail_f.cg
    file=dyn_standard_reflect_f.cg
  }
}

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

vf_heat
{
;Brake disc heat shader
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_brakeheat_f.cg
  }
}

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

shader_karoseria~vf_reflect
{
  cast_shadow=0
  compression=0
  reflect=0.1
  shininess=16
  specular=0.02 0.02 0.02 1
  diffuse=1 1 1 1
  mipmap_bias=2
  fresnel
  {
    bias=0.1
    power=4.0
    scale=0.9
  }
  layer0
  {
    map=karoseria.tga
    mipmap=0
  }
}

shader_mirror~vf_standard
{
  layer0
    {
       map=$mirror
       texscale_s=1
       texscale_r=1
       texscale_t=1
       emission=0.3 0.3 0.3 1
    }
}
shader_nodamagered~vf_standard
{
  layer0
  {
    map=nodamagered.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_znaczki~vf_standard
{
  layer0
  {
    map=znaczki.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_black~vf_standard
{
  layer0
  {
    map=black.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_flat~vf_standard
{
  layer0
  {
    map=flat.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_lights~vf_standard
{
  layer0
  {
    map=lights.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_grille2~vf_standard
{
  layer0
  {
    map=grille2.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_undercarriage~vf_standard
{
  layer0
  {
    map=undercarriage.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_przyciski~vf_standard
{
  layer0
  {
    map=przyciski.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_interior_lod0~vf_standard
{
  layer0
  {
    map=interior_lod0.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
  }
}
shader_tirea0~vf_standard
{
  layer0
  {
    map=tirea0.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
  }
}
shader_komputer~vf_standard
{
  layer0
  {
    map=komputer.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_tarcza~vf_standard
{
  layer0
  {
    map=tarcza.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_czarne~vf_standard
{
  layer0
  {
    map=czarne.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_czerwone~vf_standard
{
  layer0
  {
    map=czerwone.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_wwn~vf_standard
{
  layer0
  {
    map=wwn.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_ramka~vf_standard
{
  layer0
  {
    map=ramka.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}
shader_tablica~vf_standard
{
  layer0
  {
    map=tablica.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      depthwrite=1
    blendfunc=blend
  }
}

shader_szyby~vf_reflect
{
 cast_shadow=0
 ;was using dyn_reflect_window.cg - shader is buggy ATM (Racer 088)
;temporarily using chrome shader - no fresnel
sort_offset=1
;sort offset needed, otherwise glass hides lit headlamp models..
reflect=1.0
diffuse=1.0 1.0 1.0
ambient=1.0 1.0 1.0
;cull=none
layer0
{
 map=szyby.tga
 shininess=20
 blendfunc=blend
 specular=0.0 0.0 0.0 1.0 
 depthwrite=0
}
 layer1
 {
  map=$trackenvmap
  depthwrite=0
 }
}
shader_chrome~vf_reflect
{
  reflect=1.6
  shininess=40
  diffuse=0.1 0.1 0.1 1
  specular=1 1 1 1
  ambient=1 1 1 1
  mipmap_bias=4
  fresnel
  {
    bias=0.8
    scale=0.2
    power=2.0
  }
  layer0
  {
    map=chrome.tga
  }
  layer1
  {
    map=$trackenvmap
  }
}
shader_wheel~vf_reflect
{
  cast_shadow=0
  compression=0
  reflect=0.1
  specular=1 1 1
  shininess=50
  ; Need tangents passed while rendering
  tangents=1
  layer0
  {
    map=wheel.tga
    ;blend=src_alpha one_minus_src_alpha
  }
  layer1
  {
    ; Bumpmap
    map=fresnel.tga
  }
  layer2
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
shader_lightson2~vf_standard
{
	sort_offset=1
  layer0
  {
	map=lightson2.tga
    emission=150 150 150 1
    shininess=0
    specular=0 0 0 1
    blendfunc=blend
  }
}
shader_lightson~vf_standard
{
	sort_offset=1
  layer0
  {
	map=lightson.tga
    emission=150 150 150 1
    shininess=0
    specular=0 0 0 1
    blendfunc=blend
  }
}
shader_brake~vf_standard
{
	sort_offset=1
  layer0
  {
	map=lightson2.tga
    emission=150 150 150 1
    shininess=0
    specular=0 0 0 1
    blendfunc=blend
  }
}
shader_rev~vf_standard
{
	sort_offset=1
  layer0
  {
	map=rev.tga
    emission=150 150 150 1
    shininess=0
    specular=0 0 0 1
    blendfunc=blend
  }
}