.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

Do you prefer licensed hardware?

  • Yes for me it is vital

  • Yes, but only if it's a manufacturer I like

  • Yes, but only if the price is right

  • No, a generic wheel is fine

  • No, I would be ok with a replica


Results are only viewable after voting.
Back
Top