; driver skin
shader_driver
{
 sort_offset=-7
 layer0
 {
  map=driver.tga
 }
}

; interior ext
shader_c6interior0
{
 sort_offset=-6
 layer0
 {
  map=$tracksunmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
 }
 layer1
 {
  map=c6interior0.tga
  blendfunc=one src_alpha
 }
}
; interior int
shader_c6interior1
{
 compression=0
 sort_offset=-6
 layer0
 {
  map=c6interior1.tga
  mipmap=0
 }
 layer1
 {
  map=$tracksunmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=one dst_alpha
 }
 layer2
 {
  map=c6interior1.tga
  mipmap=0
  blendfunc=blend
 }
}
; interior mirror
shader_c6rearvmrr
{
 sort_offset=-5
 layer0
 {
  ;map=$mirror
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  emission=1 1 1 1
 }
 layer1
 {
  map=c6rearvmrr.tga
  blendfunc=blend
  mipmap=0
 }
}
shader_c6dashlit
{
 sort_offset=-5
 layer0
 {
  map=c6dashlit.tga
  emission=1 1 1 1
  blendfunc=add
  mipmap=0
 }
}
shader_c6swheel
{
 compression=0
 sort_offset=-5
 layer0
 {
  map=c6swheel.tga
 }
 layer1
 {
  map=$tracksunmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=one dst_alpha
 }
 layer2
 {
  map=c6swheel.tga
  blendfunc=blend
 }
}

; main paintjob
shader_c6paint
{
 compression=0
 layer0
 {
  map=fresnel.tga
  texgen_s=sphere_map
  texgen_t=sphere_map
  emission=1 1 1 1
  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=24
  specular=0.75 0.75 0.75
 }
 layer2
 {
  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
 }
 layer3
 {
  map=c6main.tga
  blendfunc=one src_alpha
  mipmap=0
 }
}
; plastic materials
shader_c6plastic
{
 compression=0
 sort_offset=0
 layer0
 {
  map=c6main.tga
  shininess=24
  specular=0.2 0.2 0.2
 }
 layer1
 {
  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
 }
 layer2
 {
  map=c6main.tga
  blendfunc=blend
 }
}
; decals, indicators
shader_c6decals
{ 
 sort_offset=0
 layer0
 {
  map=c6decals.tga
  alphafunc=gequal 128
  ;blendfunc=blend
  mipmap=0
 }
}

; =================== NEW LIGHTS =================== 
; rearlight inner
shader_c6rlight0
{
 sort_offset=-7
 layer0
 {
  map=c6rlight0.tga
  mipmap=0
 }
 layer1
 {
  map=shine.bmp
  shininess=44 
  specular=1 1 1 1
  blendfunc=dst_color one 
 }
 layer2
 {
  map=shine.bmp
  shininess=44
  specular=1 1 1 1
  blendfunc=dst_color one 
 }
}
; rearlights add
shader_c6rlight3
{
 sort_offset=-5
 fog=0
 ;layer0
 {
  map=stub.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer0
 {
  map=c6rlight3.tga
  blendfunc=blend
  depthwrite=0
  emission=1 1 1
  mipmap=0
 }
}
; brakelight inner
shader_c6rlight2
{
 sort_offset=-6
 fog=0
 layer0
 {
  map=c6rlight2.tga
  blendfunc=add
  emission=1 1 1
  mipmap=0
 }
 layer1
 {
  map=glow3.bmp
  emission=1 1 1 1
  blendfunc=dst_color one
  texgen_s=sphere_map
 }
 layer2
 {
  map=glow3.bmp
  emission=1 1 1 1
  blendfunc=dst_color one
  texgen_s=sphere_map
 }
}
; rearlight cover
shader_c6rlight1
{
  sort_offset=0
  ;layer0
  {
   map=stub.tga
   blendfunc=one src_alpha
   depthwrite=0
  }
  layer0
  {
   map=c6rlight0.tga
   ;blendfunc=blend
   blendfunc=src_color one_minus_src_alpha
   mipmap=0
   depthwrite=0
  }
  layer1
  {
   map=fresnelw2.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=c6rlight0.tga
   blendfunc=blend
   mipmap=0
   depthwrite=0
  }
}
shader_c6hlight0
{
 sort_offset=0
 layer0
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
 }
 layer1
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=add
 }
 layer2
 {
  map=c6hlight0.tga
  blendfunc=blend
  mipmap=0
 }
}
shader_c6hlight1
{
 sort_offset=1
 fog=0
 layer0
 {
  map=stub.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer1
 {
  map=c6hlight1.tga
  blendfunc=add
  emission=1 1 1
  mipmap=0
 }
}
shader_c6hlight2
{
 sort_offset=2
 fog=0
 layer0
 {
  map=stub.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer1
 {
  map=c6hlight2.bmp
  blendfunc=add
  emission=1 1 1
  mipmap=0
  depthwrite=1
 }
}
shader_c6hlight3
{
 sort_offset=3
 fog=0
 layer0
 {
  map=stub.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer1
 {
  map=c6hlight2.bmp
  blendfunc=add
  emission=1 1 1
  mipmap=0
  depthwrite=1
 }
}

; =================== END =================== 
; mufflers
shader_c6mufflers
{
 layer0
 {
  map=chrome.bmp
  texgen_s=sphere_map
  texgen_t=sphere_map
  blendfunc=filter 
  shininess=24
  specular=1 1 1
  emission=1 1 1
 }
 layer1
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=filter
  shininess=24
  specular=1 1 1
  ;emission=1 1 1
 }
 layer2
 {
  map=c6mufflers.tga
  blendfunc=blend
  mipmap=0
 }
}

; mirrors
shader_c6mirrors
{
 ;sort_offset=-1
 layer0
 {
  ;map=$mirror
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  emission=1 1 1 1
 }
 layer1
 {
  map=c6mirrors.tga
  blendfunc=blend
  mipmap=0
 }
}
; headlight covers
shader_c6glass1
{
 sort_offset=1
 layer0
 {
  map=stub.tga
  blendfunc=one src_alpha
  depthwrite=0
 }
 layer1
 {
  map=c6glass.tga
  blendfunc=blend
  mipmap=0
  depthwrite=0
  shininess=55
  specular=0.55 0.55 0.55
 }
 layer2
 {
  map=$trackenvmap
  texgen_s=reflection_map
  texgen_t=reflection_map
  texgen_r=reflection_map
  blendfunc=src_color one
  depthwrite=0
  shininess=55
  specular=0.55 0.55 0.55
 }
 layer3
 {
  map=c6glassf.tga
  blendfunc=blend
  depthwrite=0
  mipmap=0
 }
}
; interior windows
shader_c6glass3
{
 ;sort_offset=-1
 layer0
 {
  map=c6glass.tga
  blendfunc=src_color one_minus_src_alpha 
  depthwrite=0
  mipmap=0
 }
 layer1
 {
  map=$tracksunmap
  texgen_r=reflection_map
  texgen_s=reflection_map
  texgen_t=sphere_map
  blendfunc=add
  emission=-0.25 -0.25 -0.25
 }
 layer2
 {
  map=$tracksunmap
  texgen_r=reflection_map
  texgen_s=reflection_map
  texgen_t=sphere_map
  blendfunc=dst_color one
  emission=-0.25 -0.25 -0.25
 }
 layer3
 {
  map=c6glass.tga
  blendfunc=blend
  mipmap=0
 }
}
; exterior windows
shader_c6glass2
{
  sort_offset=1
  layer0
  {
   map=wtint.tga
   blendfunc=src_color one_minus_src_alpha 
  }
  layer1
  {
   map=c6glass.tga
   blendfunc=blend
   mipmap=0
  }
  layer2
  {
   map=$trackenvmap
   texgen_s=reflection_map
   texgen_t=reflection_map
   texgen_r=reflection_map
   blendfunc=src_color one
   shininess=55
   specular=0.55 0.55 0.55
   emission=-0.1 -0.1 -0.1
  }
  layer3
  {
   map=c6glassf.tga
   blendfunc=blend
   mipmap=0
  }
}
shader_c6bdisc0
{
 layer0
 {
  map=c6bdisc0.tga
  mipmap=0
  alphafunc=gequal 128
 }
}
shader_c6bdisc1
{
 layer0
 {
  map=c6bdisc1.tga
  mipmap=0
  alphafunc=gequal 128
 }
}
shader_c6bdisc2
{
 layer0
 {
  map=c6bdisc2.tga
  mipmap=0
  alphafunc=gequal 128
 }
}
shader_c6calpr
{
 layer0
 {
  map=c6calpr.tga
 }
}

shader_c6tire00
{
 layer0
 {
  map=c6tire00.tga
  shininess=15
  specular=0.4 0.4 0.4
  mipmap=0
 }
 layer1
 {
  map=c6tire00.tga
  blendfunc=blend
  mipmap=0
 }
}
shader_c6tire01
{
 layer0
 {
  map=c6tire01.tga
  shininess=15
  specular=0.4 0.4 0.4
  mipmap=0
 }
 layer1
 {
  map=c6tire01.tga
  blendfunc=blend
  mipmap=0
 }
}
shader_c6tire02
{
 layer0
 {
  map=c6tire02.tga
  shininess=15
  specular=0.4 0.4 0.4
  mipmap=0
 }
 layer1
 {
  map=c6tire02.tga
  blendfunc=blend
  mipmap=0
 }
}
shader_c6rim00
{
 sort_offset=0
 layer0
 {
  map=c6rim00.tga
  mipmap=0
 }
 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_c6rim01
{
 sort_offset=0
 layer0
 {
  map=c6rim01.tga
  mipmap=0
 }
 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_c6rim01b
{
 sort_offset=0
 layer0
 {
  map=c6rim01.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_c6rim02
{
 sort_offset=0
 layer0
 {
  map=c6rim02.tga
  mipmap=0
 }
 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_c6rim02b
{
 sort_offset=0
 layer0
 {
  map=c6rim02.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
 }
}