-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LightOccluder2D polygons cause editor slowdowns #52703
Comments
Can you try running a C++ profiler to see where the slowdown comes from? |
Yes, I can hook VS into Godot once I am done with my current task |
Could well be similar to #38543, possibly issuing a large number of drawcalls to draw the preview. |
Could you check if #54377 fixes it? I tested locally and couldn't reproduce the slowdown before this PR either, so I can't confirm. |
Tested on |
I can share the diagsession with someone if there is interest. I just don't want to post it here. I don't see anything suspicious. (OK my GPU get's one fire...) |
It's okay shouldn't need the project. I tried the min reproduction project again, and compiled it so the occluder debug draws even outside the editor, so I could diagnose the frame with the batching.
This is the output, so the debug drawing is the second, as a polygon all in one drawcall.
So not immediately sure why it might be slow. 🤔 BTW, if you have a different scene that is not using a closed poly, that would have been using lots of |
Could that be a driver issue? I mean the 3060 TI should be able to draw this poly. On the other hand the core usage of main thread goes up to 100% |
Possibly, it's strange behaviour, if it's with the MRP. If you are able to use a CPU profiler, and you find a load of time is spent in the driver, then that sees like a culprit. Some things you could try if that was the case:
|
Idk tbf. I could try to update my driver.
Did that. No change.
will try |
@HaSa1002 Did you end up finding what was the cause for the problem? I'm having similar performance issues with the LightOccluder2D. Hard to draw a polygon, when it gets super laggy after drawing about 15 vertices. |
This comment still applies, by the way:
(Please post results of profiling here by taking screenshots of the profiler you're using.) |
That does look like it's spending a lot of time in the driver (DrvValidateVersion seems prominent, and some sleeps and waits, which might be indicative of stalls). Very little CPU time spent within Godot itself (the audio driver is normally a false flag when profiling, as it has to keep up the audio output rate through the audio callback, irrespective of the relative speed the app is running). It's occurred to me that as well as the regular batching, when an occluder is active there's also some extra paths active outside the regular batching canvas renderer - |
Godot version
3.3.3.stable
3.4.beta4
System information
Windows 10
GLES3,
Ryzen 7 3700X,
32GB RAM
Issue description
LightOccluder2D polygons slow the editor down even with small polygons. (And my computer is not a potato)
2021-09-15.15-00-53.mp4
Steps to reproduce
gear2.tscn
LightOccluder2D
(<- slowdown starts here)Minimal reproduction project
Slow LightOccluder.zip
The text was updated successfully, but these errors were encountered: