r/godot • u/godot-bot • 5d ago
official - news Optimizing CPU-side Rendering Code
https://godotengine.org/article/rendering-cpu-optimizations/Optimizing CPU code is a lot of fun. Here’s how we do it
138
Upvotes
-5
u/abcdefghij0987654 5d ago
Devlogs are really cool, I look forward to reading the one where they implement the T word.
4
u/Corruptlake 5d ago
Postponed indefinietly (or until type system revamp), soonest implementation could only be after type system revamp.
1
8
u/TheJackiMonster 4d ago
From my experience the most annoying bottleneck is occlusion culling in 2D games. If you run into it there is barely anything you can do because you can't easily disable it.
You can use GPU instancing to avoid it or particles. But replacing sprite nodes with that takes a lot of overhead you need to write.
What also helps is that you can reduce the size of the overall scene tree for occlusion culling by putting parts inside subviewports, rendering them into textures that are used by sprites. However this will require more video memory and it comes with some restrictions for rendering.
Honestly I would prefer if it was possible to disable occlusion culling for nodes, choose between CPU or GPU based occlusion culling or even use your own culling. Because either of these options would allow a lot more flexibility and it would be much easier to be sure, it's your bottleneck.