-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[3.x] Improve BakedLightmap's lightprobes performance #80764
[3.x] Improve BakedLightmap's lightprobes performance #80764
Conversation
This may address #71162. @Favkis Can you test this PR locally? |
f8308db
to
f6e2c37
Compare
@akien-mga can someone review this to include in next beta? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super familiar with this code but it looks ok providing the suppositions are correct.
Note: I didn't test it, relying on author to test.
Thanks! |
I'm seeing around 20% improvement in framerate using the MRP, but every frame saved is a win. Tested today on my old potato Acer Chromebook with Intel graphics and MX Linux. Before #80764: --- 3.6.Beta3 --- --- 3.x built today --- |
@belzecue interesting, it seems difference is in CPU cache size. Can you test again by change "Cell Size" in Capture section of BakedLightmap from 0.5 to 1 and bake lightmap again? this reduce size of capture data from 9 to 2.2 MB. |
On v3.6.beta.custom_build [5271c97], with Cell Size bumped to 1.0 and rebaked, I'm seeing ~45 fps, so about 36% gain over baseline of 33 fps. |
50-60% better performance for light probes in BakedLightmap by simplifying some computations.
Please test it using MRP from this comment: #71162 (comment)
These simplifications are possible because alpha array values are zero:
godot/servers/visual/visual_server_scene.cpp
Line 2239 in 98976f9
and I replace fmod(x,y) by
x - int(x/y) * y
because pos's values are positive here:godot/servers/visual/visual_server_scene.cpp
Line 2221 in 98976f9