Shader Complexity still high on foliage


Having massive problems with shader complexity on my foliage at the moment. I recently changed all my Dbuffer settings and r.earlyzpass etc in order to get decals working in unlit areas.
This obviously caused the foliage shaders to act as if anything opaque was transparent, leading to massive performance loss.
I’ve tried setting r.earlyzpass to 3 as suggested [here][1] but it doesn’t seem to have fixed the problem.

Any ideas are welcome, thanks in advance!

I´m having the same issue, hope someone can help us

If you look at Unreal’s KiteDemo project. All their foliage has high complexity too. You would think it would be efficient. I gave up on foliage with Unreal for now because of this. I can only create really tiny environments.

Hello WartertonStudent,

So it looks like you are using decals in your project, and there was a bug entered recently dealing with the Shader Complexity viewmode inaccuracies and differences between painted foliage actors and their static mesh equivalent. You can track this issue by following the link provided below.


This deals with enabling the ‘Dbuffer’ decals in your project settings which causes these visual misrepresentations of your shader complexity for your foliage. With that being said, our Kite Demo was created and intended to be run on very high end GPU’s like the Nvidia Titan.

With any content that you plan on having a dense amount of, you will want to make sure that their are enough LOD’s to conserve memory and maintain high quality over certain distances. Also, you would want to create simpler forms of shaders for any individual foliage actor you plan on viewing at large/long distances. For example, you would not need your lowest Level of Detail to distort using World Position Offset to create an effect like wind because this adds uneeded instructions to something you would never notice at a far distance.

Thank you,

Andrew Hurley