Issue with foliage shader complexity

Heyhey,

recently I noticed that the shader complexity for my foliage is going through the roof.

Now I know that overdraw is bad and all but it has never been that bad. It looks like all (opacity) masked materials where transformed into completely transparent materials even though they are not.

Does anyone know what the problem might be?

This is foliage for you buddy. All it means is there’s a lot of overdraw. I can tell you that even when there’s almost no overdraw ( ie, the maker has trimmed the foliage mesh very carefully ), it still wont help the performance of you level.

Basically, once you start plastering foliage everywhere, you can kiss goodbye to about 30-50fps, depending on how ‘rich’ the scene is.

It’s just a trade off you have to make. It’s true that some foliage it a bit more performant than others, and that’s related to overdraw / shader complexity etc, but it’s never going to make an enourmous difference.

Thanks for your reply, ClockworkOcean.

I know that overdraw is a problem. But the shader complexity looks like there are ONLY transparent sections in the material which are all overlapping eachother.

Let me explain it with a screenshot of an older Engine version:

On the left there is a masked material of tree billboards. Transparent parts of the material cause overdraw which is normal. But my gras complexity (from the first pic) looks like the part on the right, which is a material set to “translucent”.
My gras shouldn’t look like that since it is of the type “masked” not “translucent”. Do you know what I mean?
The problem is that my gras has also non-transparent sections which shouldn’t cause overdraw.

I am just using the “shader complexity” - view mode (alt + 8)

There may be something weird going on with my Engine version -.-

I opened up an empty project and tried the same assets in there and it doesn’t show any overdraw at all… that also can’t be right

Just to check, which particular view mode are you using?

What I thought…

Yes, I can’t get anything like that with shader complexity view. Is there something weird going on with the material?..

odd…

ok apparently I have to change the project settings in the Rendering > Optimization Category for it to use the masked materials efficiently. I switched the “Early Z-Pass” to “Opaque and masked meshes” and checked the box for “Mask material only in early Z-Pass”

not much tbh… maybe 1-2 fps in the editor

Does it run any faster like that?

Are you using source built 4.23? I am having the same issue with Shader Complexity view. No overdraw whatsoever. The same setup and foliage in 4.22 works as expected.

I’m thinking the shader complexity in 4.23 is broken with respect to masked materials.

I am using the binary build 4.23

Seems that way, I submitted a bug report

i’m not really sure what a binary build is. is that what it’s called when use the github version? I downloaded my engine from the launcher. if i open a blank project and make a masked material, shader doesnt show anything below the clip value.

I dont remember if this issue first started when I first downloaded the engine or a bit later. the only other things I can think of other than just an engine bug is that I did update my gpu driver so maybe that could have broken it. I have nvidia gtx 1070. but i’d think if it were a driver issue it would affect all the ue4 versions.

I also uninstalled and reinstall my engine to move it to another hard drive.

I was talking to a guy on discord with the same problem as us. so unless that was one of you maybe this is affecting quite a few ppl.

I am using the Launcher Version as well and I think it also happened after a driver update for my gtx 1070.
I am not sure if this is a bug or if this is on purpose.
When you look at my answer you can see the option I changed to make it work for me. It was on something like “Decide automatically” before. So maybe UE decides differently on a per user basis and that’s why everyone has a different result? idk

I did try checking that option with no luck.

I got emailed back from from unreal after filing a bug report on this. kinda sounds like this change in behavior was a bug fix, but that the shader complexity isn’t accurate to begin with? you can read the emails, I wouldn’t really say I understand whats going on but I didn’t want to take anymore of the guy’s time with my confusion.