tracked ASE to DOF texture missing?

I wanted to get these drawn infront of geometry. These are signs on walls or a startline on the road, etc. I couldn't make up any visible changes by adding depthwrite=0 or 1.
 
Yep depthwrite seems to need to be under the layer rather than the shader.

But it'll still flicker eventually due to z-buffer fighting it seems.

I have white line decals on a road (3mm above the surface) but from helicopter view they can flicker a bit sometimes even though transparency is rendered much later than opaques in the sort oredering, and it has depthwrite=0.


I'm not sure why that happens, but I often see flickering on Carlswood from the heli view too...

But from low angles they always generally seem ok, probably almost invisible before they are so far away they begin to have z-buffer issues?


Dave
 
I've tried "sort_offset=0" inside layer and in shader and commented out. Still no luck.

Code:
shader_marks~vf_standard
{
  sort_offset=0
  cast_shadow=0
  layer0
  {
    map=br_road_marks.dds
    depthwrite=0
  }
}

It doesn't matter how close or fare and what camera-angle I choose.
Tsukuba uses a gridbox in the same way, but without flickering.
Only difference is an "blendfunc=blend" alpha.

I'll try to raise the distance between tarmac and marks next time.
 
Care to show us a screenshot so we can see what you are trying to do?

If these are not decals (using alpha) try cut into the mesh they are above so they have nothing underneath to fight with.

Dave
 
Yes, I've got loads to correct. Maybe I'll come across a fix in the next weeks (or cut it directly into the meshs). Screenshots and videos are recorded black for another mistery.
 
You can just take a screenie of the actual geometry in your 3d app though, then post it on the forum.

No need for an in-racer shot.

What is the shader under the decal using? A standard shader, bump mapped, something with transparency?

Dave
 
Screenshot is attached. The white lines are flickering.
The tarmacshader has probably some mistakes, too :)

Code:
shader_road1~vf_road
{
  ;ambient=1 1 1
  diffuse=0.5 0.5 0.5
  cast_shadow=0
  ; Avoid projected lights cutting through the first layer's texture alpha channel (0..1)
  bounce_alpha=0
  ; Reflectivity of the road for projective lights
  bounce_amount=1.0
  layer0
  {
    map=br_road_1.dds
  }
  layer1
  {
    map=br_road_1_add.dds
    mode=linear
  }
    layer2
  {
    map=br_road_1nm.dds
    mode=linear
  }
}

shader is :
Code:
vf_road
{
  ; The road uses specularity but burned through the red channel to get a coarse gloss map
  specular=1 1 1
  shininess=6
  scale=1
  vertex_shader
  {
    file=standard_v.cg
  }
  fragment_shader
  {
    file=standard_detail_burn_a_f.cg
    ; Burn specularity through alpha
    ;file=standard_burn_a_f.cg
  }
}
 

Attachments

  • startline.jpg
    startline.jpg
    86.1 KB · Views: 304
Yes, but don't worry, I'll upload a beta in the next few weeks. It would be great, if you could have a look at a more advanced stage. Currently it does need so many changes, I'd mess up your corrections again :)
 
Code:
vf_decal
{
vertex_shader 
{
file=standard_v.cg
}
fragment_shader
{
file=standard_transparent_f.cg
}
}

Code:
shader_runway_decal~vf_decal
{
cast_shadow=0
layer0
{
map=runway_decal.dds
shininess=6
specular=1 1 1 1
 
alpha_to_coverage=1
depthwrite=0
alphafunc=gequal 128
}
}
 
shader_skids_01~vf_decal
{
cast_shadow=0
layer0
{
map=skids_01.dds
shininess=10
specular=0.25 0.25 0.25 1
 
;alpha_to_coverage=1
depthwrite=0
blendfunc=blend
;alphafunc=gequal 24
}
}

Hi Sneer,

These are my settings for decals and they work ok right now.

Note in the 2nd entry for the skids/rubber laid down by race cars on race tracks then I use blendfunc=blend rather than alpha to coverage type alpha management, but that is more costly but looks better for the softer edges.


I use a dds texture, DXT3 iirc.


What version of Racer are you using. RC6 seems to have z-depth stuff a bit broken right now with lots of things flickering around. Ruud was recently playing with sorting and z-buffer depth map stuff so that may be the cause.

So stick to RC5c for now for a more solid development version :)

Dave
 
I've been testing the alphablend for skidmarks today and it's working.
The only way to receive no flickering is:
Set tarmac texture to depthwrite=0
and set the decal skidmarks texture to depthwrite=0, aswell.
This doesn't make sense to me, but it is working with one minor problem:

The road shines through itself. I've attached a screenshot.
tarmac-depthwrite.jpg
The track has a lot of elevation-changes and the road "shines" through it's own texture at overlapping areas (I hope that's not too horrible english..).
 

Latest News

What's needed for simracing in 2024?

  • More games, period

  • Better graphics/visuals

  • Advanced physics and handling

  • More cars and tracks

  • AI improvements

  • AI engineering

  • Cross-platform play

  • New game Modes

  • Other, post your idea


Results are only viewable after voting.
Back
Top