; filename track.shd
; Spa Francorchamps Shader File
; The AlfaNut  20 Feb 2004
;
; CG added and emissive removed by Tiberius, June 2009
;

vf_standard
{
compression=0
mipmap=0
specular=0.5 0.5 0.5
diffuse=1.6 1.6 1.6
shininess=6
  ; Most-often used shader
  ; Carlswood uses vertex coloring a lot. Other tracks may use 'standard_v.cg' and 'standard_f.cg' instead.
  vertex_shader
  {
    file=standard_vc_v.cg
  }
  fragment_shader
  {
    file=cg/standard_vc_specmap_f.cg
  }
}

vf_tree
{
;similar shader to vf_standard but no spec mapping
compression=0
mipmap=0
specular=1.0 1.0 1.0
diffuse=1.6 2.0 1.9
;0.9 1.0 1.0
shininess=24
  ; Most-often used shader
  ; Carlswood uses vertex coloring a lot. Other tracks may use 'standard_v.cg' and 'standard_f.cg' instead.
  vertex_shader
  {
    file=standard_vc_v.cg
  }
  fragment_shader
  {
    file=cg/standard_vc_specmap_f.cg
  }
}

vf_reflect
{
specular=0.4 0.4 0.4
shininess=24
compression=0
mipmap=0
  ; Animation test (top moves around)
  vertex_shader
  {
    file=dyn_standard_reflect_v.cg
  }
  fragment_shader
  {
    file=dyn_standard_reflect_f.cg
  }
}
vf_road
{
compression=0
mipmap=0
  ; The road uses ;specularity but burned through the alpha channel to get a coarse gloss map
  specular=1.3 1.3 1.3
  ;ambient=0.1 0.1 0.1
  shininess=4
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    ; Burn ;specularity through red
    file=cg/standard_burn_alpha_f.cg
  }
}

vf_grass
{
compression=0
mipmap=0
  ; The road uses ;specularity but burned through the alpha channel to get a coarse gloss map
  specular=1.0 1.0 1.0
  ;ambient=0.1 0.1 0.1
  shininess=4
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    ; Burn ;specularity through red
    file=cg/standard_burn_alpha_grass_f.cg
  }
}

vf_sky
{
compression=0
mipmap=0
  vertex_shader
  {
    file=sky_daynight_v.cg
	;file=cg/sky_pan_v.cg
  }
  fragment_shader
  {
    file=sky_daynight_f.cg
	;file=cg/sky_pan_f.cg
  }
}

vf_wave_flag
{
  vertex_shader 
  {
    file=standard_wave_v.cg
  }
  fragment_shader
  {
    file=standard_wave_f.cg
  }
}
;shader_flag~vf_wave_flag
{
  cull=none
  layer0
  {
    map=holland.tga
    depthwrite=0
  }
}

;;;;;;;;;;;;;START TRACK SHADERS;;;;;;;;;;;

shader_sky~vf_sky
{
  sky=1
  ;fog=0
  cull=none
  layer0
  {
    ;texenv=replace
    map=sky_clouds.tga
    ;depthfunc=always
    depthwrite=0
  }
  layer1
  {
    ;texenv=replace
    map=sky.tga
    ;depthfunc=always
    depthwrite=0
  }
}
;shader_textured_material_sskytop~vf_sky
{
  sky=1
  layer0
  {
    map=sskytop.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky12~vf_sky
{
  sky=1
  layer0
  {
    map=ssky12.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky11~vf_sky
{
  sky=1
  layer0
  {
    map=ssky11.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky10~vf_sky
{
  sky=1
  layer0
  {
    map=ssky10.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky11~vf_sky
{
  sky=1
  layer0
  {
    map=ssky11.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky2~vf_sky
{
  sky=1
  layer0
  {
    map=ssky2.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky3~vf_sky
{
  sky=1
  layer0
  {
    map=ssky3.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky4~vf_sky
{
  sky=1
  layer0
  {
    map=ssky4.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky5~vf_sky
{
  sky=1
  layer0
  {
    map=ssky5.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky6~vf_sky
{
  sky=1
  layer0
  {
    map=ssky6.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky7~vf_sky
{
  sky=1
  layer0
  {
    map=ssky7.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky8~vf_sky
{
  sky=1
  layer0
  {
    map=ssky8.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}
;shader_textured_material_ssky9~vf_sky
{
  sky=1
  layer0
  {
    map=ssky9.tga
    wrap_t=clamp_to_edge
    depthwrite=0
  }
}

shader_textured_material_banner1~vf_standard
{
  layer0
  {
    map=banner1.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_banner3~vf_standard
{
  layer0
  {
    map=banner3.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_lghttre~vf_standard
{
  layer0
  {
    map=lghttre.tga
  }
}
shader_textured_material_banner4~vf_standard
{
  layer0
  {
    map=banner4.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_banner2~vf_standard
{
  layer0
  {
    map=banner2.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_pitbldg~vf_standard
{
  layer0
  {
    map=pitbldg.tga
  }
}
shader_textured_material_racectrl~vf_standard
{
  layer0
  {
    map=racectrl.tga
  }
}
shader_textured_material_bldg2a~vf_standard
{
  layer0
  {
    map=bldg2a.tga
  }
}
shader_textured_material_bldg2b~vf_standard
{
  layer0
  {
    map=bldg2b.tga
  }
}
shader_textured_material_bldg1a~vf_standard
{
  layer0
  {
    map=bldg1a.tga
  }
}
shader_textured_material_barrier~vf_standard
{
  layer0
  {
    map=barrier.tga
  }
}
shader_textured_material_shaka~vf_standard
{
  layer0
  {
    map=shaka.tga
  }
}
shader_textured_material_pplg~vf_standard
{
  layer0
  {
    map=pplg.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_crane1~vf_standard
{
  layer0
  {
    map=crane1.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_crane2~vf_standard
{
  layer0
  {
    map=crane2.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_cama~vf_standard
{
  layer0
  {
    map=cama.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_concli~vf_standard
{
  layer0
  {
    map=concli.tga
  }
}
shader_textured_material_conct~vf_standard
{
  layer0
  {
    map=conct.tga
  }
}
shader_textured_material_concri~vf_standard
{
  layer0
  {
    map=concri.tga
  }
}
shader_textured_material_bighilla~vf_standard
{
  layer0
  {
    map=bighilla.tga
  }
}
shader_textured_material_bighillb~vf_standard
{
  layer0
  {
    map=bighillb.tga
  }
}
shader_textured_material_roada~vf_road
{
  layer0
  {
    map=roada.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_grasr~vf_standard
{
  layer0
  {
    map=grasr.tga
  }
}
shader_textured_material_rsa~vf_standard
{
  layer0
  {
    map=rsa.tga
  }
}
shader_textured_material_grascc~vf_standard
{
  layer0
  {
    map=grascc.tga
  }
}
shader_textured_material_plsand~vf_standard
{
  layer0
  {
    map=plsand.tga
  }
}
shader_textured_material_desert~vf_standard
{
  layer0
  {
    map=desert.tga
  }
}
shader_textured_material_armcof~vf_standard
{
  layer0
  {
    map=armcof.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_armcob~vf_standard
{
  layer0
  {
    map=armcob.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_fence1~vf_reflect
{
  reflect=0.1
  layer0
  {
    map=fence1.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_fencet~vf_reflect

{
  reflect=0.1
  layer0
  {
    map=fencet.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_rock1~vf_standard
{
  layer0
  {
    map=rock1.tga
  }
}
shader_textured_material_sand~vf_standard
{
  layer0
  {
    map=sand.tga
  }
}
shader_textured_material_armcyb~vf_standard
{
  layer0
  {
    map=armcyb.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_armcyf~vf_standard
{
  layer0
  {
    map=armcyf.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_flgr~vf_standard
{
  layer0
  {
    map=flgr000.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_gnstd1c~vf_standard
{
  layer0
  {
    map=gnstd1c.tga
  }
}
shader_textured_material_gnstd1a~vf_standard
{
  layer0
  {
    map=gnstd1a.tga
  }
}
shader_textured_material_gnstd1b~vf_standard
{
  layer0
  {
    map=gnstd1b.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_roadprk1~vf_road
{
  layer0
  {
    map=roadprk1.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_tree2~vf_tree
{
  layer0
  {
    alpha_to_coverage=1
    depthwrite=1
    map=tree2.tga
    ;blendfunc=blend
    alphafunc=gequal 128
    ;depthwrite=0
    ; Avoid too much light difference based on direction
    diffuse=0.5 0.6 0.5 
    ;ambient=1 1 1
    ;diffuse=0.1 0.1 0.1
  }
}
shader_textured_material_tree3~vf_tree
{
  layer0
  {
    alpha_to_coverage=1
    depthwrite=1
    map=tree3.tga
    ;blendfunc=blend
    alphafunc=gequal 128
    ;depthwrite=0
    ; Avoid too much light difference based on direction
    diffuse=0.5 0.6 0.5 
    ;ambient=1 1 1
    ;diffuse=0.1 0.1 0.1
  }
}
shader_textured_material_tree1~vf_tree
{
  layer0
  {
    alpha_to_coverage=1
    depthwrite=1
    map=tree1.tga
    ;blendfunc=blend
    alphafunc=gequal 128
    ;depthwrite=0
    ; Avoid too much light difference based on direction
    diffuse=0.5 0.6 0.5 
    ;ambient=1 1 1
    ;diffuse=0.1 0.1 0.1
  }
}
shader_textured_material_grass~vf_grass
{
  layer0
  {
    map=grass.tga
  }
}
shader_textured_material_logobrdg~vf_standard
{
  layer0
  {
    map=logobrdg.tga
  }
}
shader_textured_material_logopetr~vf_standard
{
  layer0
  {
    map=logopetr.tga
  }
}
shader_textured_material_logotoyt~vf_standard
{
  layer0
  {
    map=logotoyt.tga
  }
}
shader_textured_material_logomblo~vf_standard
{
  layer0
  {
    map=logomblo.tga
  }
}
shader_textured_material_logoagip~vf_standard
{
  layer0
  {
    map=logoagip.tga
  }
}
shader_textured_material_logobapc~vf_standard
{
  layer0
  {
    map=logobapc.tga
  }
}
shader_textured_material_logobrdh~vf_standard
{
  layer0
  {
    map=logobrdh.tga
  }
}
shader_textured_material_mgnstd1b~vf_standard
{
  layer0
  {
    map=mgnstd1b.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1a~vf_standard
{
  layer0
  {
    map=mgnstd1a.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1c~vf_standard
{
  layer0
  {
    map=mgnstd1c.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1d~vf_standard
{
  layer0
  {
    map=mgnstd1d.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1e~vf_standard
{
  layer0
  {
    map=mgnstd1e.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1f~vf_standard
{
  layer0
  {
    map=mgnstd1f.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_mgnstd1g~vf_standard
{
  layer0
  {
    map=mgnstd1g.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_roadl~vf_road
{
  layer0
  {
    map=roadl.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_tsd~vf_standard
{
  layer0
  {
    map=tsd.tga
  }
}
shader_textured_material_tsleg~vf_standard
{
  layer0
  {
    map=tsleg.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_tsbck~vf_standard
{
  layer0
  {
    map=tsbck.tga
  }
}
shader_textured_material_tsc~vf_standard
{
  layer0
  {
    map=tsc.tga
  }
}
shader_textured_material_tse~vf_standard
{
  layer0
  {
    map=tse.tga
  }
}
shader_textured_material_tsb~vf_standard
{
  layer0
  {
    map=tsb.tga
  }
}
shader_textured_material_tsa~vf_standard
{
  layer0
  {
    map=tsa.tga
  }
}
shader_textured_material_ppla~vf_standard
{
  layer0
  {
    map=ppla.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_pplf~vf_standard
{
  layer0
  {
    map=pplf.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_pple~vf_standard
{
  layer0
  {
    map=pple.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_peopwall~vf_standard
{
  layer0
  {
    map=peopwall.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_lpole~vf_standard
{
  layer0
  {
    map=lpole.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_tlvsn~vf_standard
{
  layer0
  {
    map=tlvsn.tga
  }
}
shader_textured_material_amba~vf_standard
{
  layer0
  {
    map=amba.tga
  }
}
shader_textured_material_ambc~vf_standard
{
  layer0
  {
    map=ambc.tga
  }
}
shader_textured_material_ambb~vf_standard
{
  layer0
  {
    map=ambb.tga
  }
}
shader_textured_material_ambd~vf_standard
{
  layer0
  {
    map=ambd.tga
  }
}
shader_textured_material_ylit~vf_standard
{
  layer0
  {
    map=ylit.tga
  }
}
shader_textured_material_towh~vf_standard
{
  layer0
  {
    map=towh.tga
  }
}
shader_textured_material_towf~vf_standard
{
  layer0
  {
    map=towf.tga
  }
}
shader_textured_material_towr~vf_standard
{
  layer0
  {
    map=towr.tga
  }
}
shader_textured_material_towl~vf_standard
{
  layer0
  {
    map=towl.tga
  }
}
shader_textured_material_towfl~vf_standard
{
  layer0
  {
    map=towfl.tga
  }
}
shader_colored_material~vf_standard
{
  layer0
  {
    map=black.tga
  }
}
shader_textured_material_logbicb~vf_standard
{
  layer0
  {
    map=logbicb.tga
  }
}
shader_textured_material_sakhir~vf_standard
{
  layer0
  {
    map=sakhir.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_saktop~vf_standard
{
  layer0
  {
    map=saktop.tga
  }
}
shader_textured_material_tentc~vf_standard
{
  layer0
  {
    map=tentc.tga
  }
}
shader_textured_material_tentd~vf_standard
{
  layer0
  {
    map=tentd.tga
  }
}
shader_textured_material_tentg~vf_standard
{
  layer0
  {
    map=tentg.tga
  }
}
shader_textured_material_tenth~vf_standard
{
  layer0
  {
    map=tenth.tga
  }
}
shader_textured_material_roadb~vf_road
{
  layer0
  {
    map=roadb.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_roadr~vf_road
{
  layer0
  {
    map=roadr.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_roadsf~vf_road
{
  layer0
  {
    map=roadsf.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_tiree~vf_standard
{
  layer0
  {
    map=tiree.tga
  }
}
shader_textured_material_tirew~vf_standard
{
  layer0
  {
    map=tirew.tga
  }
}
shader_textured_material_tiret~vf_standard
{
  layer0
  {
    map=tiret.tga
  }
}
shader_textured_material_dirt~vf_grass
{
  layer0
  {
    map=dirt.tga
  }
}
shader_textured_material_fencp2~vf_reflect
{
  reflect=0.1
  layer0
  {
    map=fencp2.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_fencp1~vf_reflect
{
  reflect=0.1
  layer0
  {
    map=fencp1.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_roadh~vf_road
{
  layer0
  {
    map=roadh.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_roadg~vf_road
{
  layer0
  {
    map=roadg.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_roadpit~vf_road
{
  layer0
  {
    map=roadpit.tga
    mipmap=1
    mipmap_lod_bias=-1
  }
}
shader_textured_material_flagbox1~vf_reflect
{
  reflect=0.1
  layer0
  {
    map=flagbox1.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_flagbox2~vf_reflect
{
  reflect=0.1
  layer0
  {
    map=flagbox2.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_pplc~vf_standard
{
  layer0
  {
    map=pplc.tga
        blendfunc=blend
        alphafunc=gequal 100
        shininess=128
        depthwrite=1 
        texenv=replace
  }
}
shader_textured_material_ref~vf_standard
{
  layer0
  {
    map=ref.tga
  }
}
shader_textured_material_flgb~vf_wave_flag
{
  ;cull=none
  layer0
  {
    map=bflag.tga
    blendfunc=blend
    alphafunc=gequal 128
    ;depthwrite=0
    ; Avoid too much light difference based on direction
    diffuse=0.5 0.6 0.5 
  }
}
shader_textured_material_tree4~vf_tree
{
  layer0
  {
    alpha_to_coverage=1
    depthwrite=1
    map=tree4.tga
    ;blendfunc=blend
    alphafunc=gequal 128
    ;depthwrite=0
    ; Avoid too much light difference based on direction
    diffuse=0.5 0.6 0.5 
    ;ambient=1 1 1
    ;diffuse=0.1 0.1 0.1
  }
}