;
; 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
  }
}
;;;;;;;;START CAR SHADERS;;;;;;;;;

shader_c0~vf_reflect_bump
{
  compression=0
  reflect=0.5
  specular=1 1 1
  shininess=50
  ; Need tangents passed while rendering
  tangents=1
  layer0
  {
    map=c0.tga
    ;blend=src_alpha one_minus_src_alpha
  }
  layer1
  {
    ; Bumpmap
    map=bodycolorM.tga
  }
  layer2
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
shader_cinza2~vf_standard
{
  layer0
  {
    map=cinza2.tga
    blendfunc=blend
  }
}
shader_nodamage~vf_standard
{
  layer0
  {
    map=nodamage.tga
    blendfunc=blend
  }
}
shader_baer~vf_standard
{
  layer0
  {
    map=baer.tga
    blendfunc=blend
  }
}
shader_baer1~vf_standard
{
  layer0
  {
    map=baer1.tga
    blendfunc=blend
  }
}
shader_wheel2~vf_standard
{
  layer0
  {
    map=wheel2.tga
    blendfunc=blend
  }
}
shader_fog~vf_standard
{
  layer0
  {
    map=fog.tga
    blendfunc=blend
  }
}
shader_adesivo~vf_reflect
{
	layer0
	{
		map=adesivo.tga
		blendfunc=blend
    		depthwrite=0
	}
}
shader_adesivo1~vf_reflect
{
	layer0
	{
		map=adesivo1.tga
		blendfunc=blend
    		depthwrite=0
	}
}
shader_vteca~vf_reflect
{
	layer0
	{
		map=vteca.tga
		blendfunc=blend
    		depthwrite=0
	}
}
shader_engine~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=engine.tga
  }
  layer1
  {
    map=engine_bump.tga
   mipmap_lod_bias=-1
  }
}
shader_engine2~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=engine2.tga
  }
  layer1
  {
    map=engine2_bump.tga
   mipmap_lod_bias=-1
  }
}
shader_engineskin2~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=engineskin2.tga
  }
  layer1
  {
    map=engineskin2_bump.tga
   mipmap_lod_bias=-1
  }
}shader_engineskin~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=engineskin.tga
  }
  layer1
  {
    map=engineskin_bump.tga
   mipmap_lod_bias=-1
  }
}
shader_cinza~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=cinza2.tga
  }
  layer1
  {
    map=bodycolorM.tga
   mipmap_lod_bias=-1
  }
}
shader_cinza1~vf_bump
{
  reflect=0
  compression=0
  specular=0.36 0.36 0.36
  shininess=20
  motion_blur=0
  tangents=1
  layer0
  {
    map=cinza.tga
  }
  layer1
  {
    map=bodycolorM.tga
   mipmap_lod_bias=-1
  }
}
shader_maledriver~vf_standard
{
compression=0
ambient=0.6 0.6 0.6
diffuse=1.0 1.0 1.0
specular=0.05 0.05 0.05
shininess=16
  layer0
  {
    map=maledriver.tga
  }
}
shader_rodavti~vf_reflect_bump
{
  compression=0
  reflect=0.5
  specular=1 1 1
  shininess=50
  ; Need tangents passed while rendering
  tangents=1
  layer0
  {
    map=rodavti.tga
    ;blend=src_alpha one_minus_src_alpha
  }
;  layer1
;  {
;    ; Bumpmap
;    map=rodavti_bump.tga
;  }
  layer1
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
shader_undercarriage~vf_standard
{
  layer0
  {
    map=undercarriage.tga
  }
}
shader_interior_lod0~vf_standard
{
  layer0
  {
    map=interior_lod0.tga
  }
}
shader_lights~vf_standard
{
  layer0
  {
    map=lights.tga
  }
}
shader_lanternas~vf_standard
{
  layer0
  {
    map=lanternas.tga
  }
}
shader_bumper_frame~vf_standard
{
  layer0
  {
    map=bumper_frame.tga
  }
}
shader_seat~vf_standard
{
  layer0
  {
    map=seat.tga
  }
}
shader_disco~vf_standard
{
  motion_blur=0
  ; Brake disc
  layer0
  {
    map=disco.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
  {
    ; Burn heat through texture's alpha
    file=standard_heat_f.cg
  }
}
;shader_tyres~vf_standard
;{
;  layer0
;  {
;    map=tyres.tga
;  }
;}
shader_plate~vf_standard
{
  layer0
  {
    map=plate.tga
  }
}
shader_metal~vf_reflect
{
  compression=0
  reflect=1
  specular=0.3 0.3 0.3 0.3
  shininess=50
  layer0
  {
    map=metal.tga
  }
  layer1
  {
    ; Reflection cubemap
    map=$trackenvmap
  }
}
shader_glass~vf_reflect
{
  diffuse=0 0 0 0
  sort_offset=1
  reflect=0.6
  layer0
  {
    map=glass.tga
    blendfunc=blend
    ;blendfunc=one src_alpha
  }
  layer1
  {
    map=$trackenvmap
  }
}
shader_windows~vf_reflect
{
;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=windows.tga
  shininess=20
  blendfunc=blend
  specular=0.0 0.0 0.0 1.0 
  depthwrite=0
 }
 layer1
  {
   map=$trackenvmap
   depthwrite=0
   }
}
shader_windback~vf_reflect
{
;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=windback.tga
  shininess=20
  blendfunc=blend
  specular=0.0 0.0 0.0 1.0 
  depthwrite=0
 }
 layer1
  {
   map=$trackenvmap
   depthwrite=0
   }
}

shader_mirror~vf_standard
{	
  diffuse=0.1 0.1 0.1
  layer0
   {
     map=$mirror
;     texscale_s=1
;     texscale_r=1
;     texscale_t=1
;     emission=0.3 0.3 0.3 1
   }
}

shader_lights1~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights1.tga
       blendfunc=add
       ;texenv=replace
       emission=10 10 10 1
    }
}
shader_lights2~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights2.tga
       blendfunc=add
       ;texenv=replace
       emission=10 10 10 1
    }
}
shader_lights3~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights3.tga
       blendfunc=add
       ;texenv=replace
       emission=50 50 50 1
    }
}
shader_lights4~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights4.tga
       blendfunc=add
       ;texenv=replace
       emission=5 5 5 1
    }
}
shader_lights5~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights5.tga
       blendfunc=add
       ;texenv=replace
       emission=50 50 50 1
    }
}
shader_lights6~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights6.tga
       blendfunc=add
       ;texenv=replace
       emission=50 50 50 1
    }
}
shader_lights7~vf_standard
{
  sort_offset=1
  layer0
    {
       map=lights7.tga
       blendfunc=add
       ;texenv=replace
       emission=5 5 5 1
    }
}
shader_brakes~vf_standard
{
  sort_offset=1
  layer0
    {
       map=brakes.tga
       blendfunc=add
       ;texenv=replace
       emission=50 50 50 1
    }
}

