Download

Distance culled meshes showing terribly in shader complexity mode

I tried asking in the answerhub but I wasn’t very lucky so I would like to start this thread here…

I have group of meshes painted on a plane with the foliage tool. The meshes are using the culling option inside the foliage type and it seems to work just fine. At distance they don’t show up. I have tried culling them with the Per Instance Fade amount node or with classical culling techniques (distance cull fade node or camera distance divided by world position, and so forth)- The problem comes when I look into the shader complexity mode and it’s giving me terrible results when there is actually no meshes to render, no a single foliage vertex visible and yet it looks like this. Does someone know if this is a real issue or just a visualization one? I tried profiling the overdraw or material complexity itself but all of that is under control, really.

Thanks in advance!

I just want to know exactly same as i painted foliage with foliage tool but with quad overdraw it is still visible.

It looks like this is an overdraw issue, as the texture data is effectively masked out from your plane, leading to more overdraw if you’re using a masked material. What I do instead is utilize the PerInstanceFadeAmount info as a value to displace the vertices down below the ground, forcing the quads out of site and also giving off kind of a neat “growth” effect for the distance fade.

Could be a bug in the engine… or a bug in the visualizer within the editor. I’d definitely try reporting it as a bug on answerhub as something is not right.

have you changed the global LOD distances for staticmeshes and/or foliage? (with r.foliage.LODdistancescale, or with the scalability settings)
I’ve found that if you change these, only the Lit viewport works accordingly

what exactly, in mesh settings for every mesh?
As you see after culling radius ends it gets worse actually but same time visibility is culled well.

Exactly. I came to the conclusion that it wasn’t due to the overdraw because of the same thing. I had almost no overdraw in the mesh but i did in the clipping unexisting mesh.

My question is… does this affect the performance? or is it just the shader complexity visualizer suffering :stuck_out_tongue: