;
; Lambo shaders
;

;
; Vertex/fragment shader templates
;
vf_reflect
{
  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_standard
{
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    file=standard_f.cg
  }
}

;
; Racer shaders
;
shader_gloss~vf_reflect
{
  compression=0
  reflect=0.5
  specular=1 1 1
  shininess=50
  ; Need tangents passed while rendering
  tangents=1
  layer0
  {
    map=lambobody.tga
    ;blend=src_alpha one_minus_src_alpha
  }
  layer1
  {
    ; Bumpmap
    map=lambobody_normal.tga
  }
  layer2
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
XXXshader_gloss
{
  layer0
  {
    map=fresnel.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
    blendfunc=filter
  }
  layer2
  {
    map=lambobody.tga
    blendfunc=one src_alpha
    emission=0 0 0 1
    shininess=0
    specular=0 0 0 1
  }
}

shader_matte~vf_standard
{
  layer0
    {
      map=lambobody.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
    }
}


shader_glass~vf_standard
{
  sort_offset=1
  layer0
    {
      map=glass.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
      blendfunc=one src_alpha
    }
  layer1
    {
      map=$trackenvmap
      texgen_s=reflection_map
      texgen_t=reflection_map
      texgen_r=reflection_map
      blendfunc=src_color one
      emission=0 0 0 1
    }
}

shader_decal~vf_standard
{
  layer0
  {
    map=glass.tga
    emission=0 0 0 1
    shininess=0
    specular=0 0 0 1
    blendfunc=blend
  }
}

shader_underbody~vf_standard
{
  layer0
  {
    map=underbodytex.tga
    emission=0 0 0 1
    shininess=0
    specular=0 0 0 1
  }
}


shader_interior~vf_standard
{
  layer0
    {
      map=interior.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
    }
}


shader_wheelfront
{
  motion_blur=0
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
  }
  layer1
  {
;map=interior.tga
    map=tirerim.tga
    blendfunc=one src_alpha
    ;emission=0 0 0 1
    shininess=50
    specular=1 1 1
    ambient=0.2 0.2 0.2
    ;ambient=1 1 1
  }
}

shader_wheelrear
{
  motion_blur=0
  layer0
  {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
  }
  layer1
  {
    map=tirerimrear.tga
    blendfunc=one src_alpha
    ;emission=0 0 0 1
    shininess=50
    specular=1 1 1
  }
}


shader_wheelinside~vf_standard
{
  motion_blur=0
  layer0
    {
      map=tireriminside.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
    }
}

shader_disc
{
  motion_blur=0
  ; Brake disc
  layer0
  {
    map=brakedisktext.tga
    emission=0 0 0 1
    shininess=32
    specular=1 1 1 1
  }
  ; Brakedisc heat shader
  vertex_shader
  {
    file=dyn_standard_v.cg
  }
  fragment_shader
  {
    ; Use disc heat global shader
    file=standard_heat_f.cg
    ;file=cg/disc_heat.cg
  }
}

shader_tyre~vf_standard
{
  motion_blur=0
  layer0
    {
      map=tiretread.tga
      emission=0 0 0 1
      shininess=0
      specular=0 0 0 1
    }
}

shader_shadowmap~vf_standard
{
  layer0
    {
      map=shadowmap.tga
      emission=1 1 1 1
      shininess=0
      specular=0 0 0 1
      texenv=replace
    }
}


shader_brakelight~vf_standard
{
  layer0
    {
      map=brakelight.tga
      emission=1 1 1 1
      shininess=0
      specular=0 0 0 1
      blendfunc=blend
      texenv=replace
    }
}

shader_reverselight~vf_standard
{
  layer0
  {
    map=lambobody.tga
    blendfunc=add
    depthwrite=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
   }
}
