.dds alpha channel

Hi and sorry for all these newbie questions...

I've made a fence. This is a .dds texture, DXT5 with alpha channel. So the fence sould have transparent parts on Racer,( automatically?).

Unfortunally, Alpha doesn't work in Racer...

Why it doesn't work ? thanks for help...
 
Hey dude,
Alpha channel works in Racer like a charm...;)
I'm not sure what you are doing wrong...maybe you post the track name from what you are talking...

or you post the shader part you are using the texture...

or...oh i have a better idea...why not trying this:

Code:
vf_standard_transparent
{
  ; Shader for transparent (blended) materials
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_transparent_f.cg
  }
}

shader_materialname here~vf_standard_transparent
{
  cast_shadow=1
  ;cull=none
  layer0
  {
  map=texturename here.dds
  alpha_to_coverage=1
  alphafunc=gequal 128
  }
}
this is the simple version for transparent materials, you can unkomment the cull=none for things you wanna see from front and rear side with not doubbled the faces...but i prefer to model it..

or you can use this for a simple tree:

Code:
vf_x_tree
{
    cull=none
    vertex_shader
    {
        file=standard_xtree_v.cg
    }
    fragment_shader
    {
        file=standard_xtree_f.cg
        ;file=standard_xtree_basic_f.cg
    }
}

shader_materialname here~vf_x_tree
{
  cast_shadow=1
  layer0
  {
  map=texturename here.dds
  alpha_to_coverage=1
  alphafunc=gequal 128
  }
}

have fun...

Alex
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 378 16.2%
  • < 2 years

    Votes: 257 11.0%
  • < 3 years

    Votes: 247 10.6%
  • < 4 years

    Votes: 181 7.8%
  • < 5 years

    Votes: 304 13.1%
  • < 10 years

    Votes: 261 11.2%
  • < 15 years

    Votes: 167 7.2%
  • < 20 years

    Votes: 129 5.5%
  • < 25 years

    Votes: 100 4.3%
  • Ok, I am a dinosaur

    Votes: 305 13.1%
Back
Top