• 26500+ Members! Dear Guest, click this link to join the community on the official RaceDepartment Discord server

.dds alpha channel

berzingue

10RPM
Mar 25, 2015
21
0
39
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...
 

Alexander Knoll

NEVER GIVE UP!!
Apr 5, 2009
1,418
286
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
 

What is your favorite social network?

  • Twitter

    Votes: 95 31.4%
  • Instagram

    Votes: 116 38.3%
  • Facebook

    Votes: 53 17.5%
  • Other (specify in thread)

    Votes: 66 21.8%