Alpha scissor option causes severe framerate drop.

JohnEKJohnEK Posts: 18Member
edited June 10 in Shaders

As the title states, when using the built-in shader, enabling alpha scissor causes a severe frame drop from 60 down to 15fps! Yet Alpha masking shouldn't be that expensive. Maybe someone can give me a clue on the issue? I would consider it a bug or an unoptimized feature.

EDIT:
Using Godot v3.0.2 stable btw.

Answers

  • MegalomaniakMegalomaniak Posts: 923Admin
    edited June 10

    @JohnEK said:
    Yet Alpha masking shouldn't be that expensive. Maybe someone can give me a clue on the issue?

    I wouldn't be so sure about that statement, I mean on modern and higher end HW sure, but...

    @JohnEK said:
    I would consider it a bug or an unoptimized feature.

    My guess without testing would be that it might have to do with culling perhaps. That is to say yes, I'm sure v2 especially could be more optimized. I recon you'll want to migrate to 3.1 once it's released.

  • TwistedTwiglegTwistedTwigleg Posts: 778Admin

    Another reason for the FPS drop could be the increased complexities for calculating the shadows through the leaves.One way you could test this is to remove shadows from the light(s) in the scene and see what the FPS is.

    Also, do you have the same FPS drop when alpha scissors is turned off, the transparency flag is turned on, and the depth draw mode set to something like "Opaque Pre-Pass"?

  • JohnEKJohnEK Posts: 18Member
    edited June 11

    Thanks for the feedback on the issue.

    @Megalomaniac, The problem that I see here is that alpha masking was created for saving resources from extra geometry rendering. In this case, the exact opposite is happening.

    Let's forget about the pine tree for a moment since it's a quite complex structure by nature. I also did a small experiment using 1 poly with a fence wire masked material and I got the exact same results. Modeling the actual wires performs better compared to masking a single poly...

    @TwistedTwigleg that's what I thought in the beginning too, however, there are two ways I can get my fps bk. One is to set the material to unshaded ( obviously) and the other to disable masking.

  • CalinouCalinou Posts: 183Admin Godot Developer
    edited June 11

    Please create an issue on GitHub with an example project attached so that developers can be aware of it.

    Note that as outlined by a news article from February 2018, the OpenGL ES 3.0-based renderer is unlikely to receive any further work since it will eventually be replaced by a Vulkan-based renderer.

  • JohnEKJohnEK Posts: 18Member

    Thanks @Calinou. I think I should wait for the next stable version and see what happens. If it still runs poorly I'll fold that GitHub issue.

  • MegalomaniakMegalomaniak Posts: 923Admin

    No, report it now. If there is someone with the interest to debug and fix this they'll only know to do so if there is a report for it. :wink:

Sign In or Register to comment.