mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Use a giant UBO to optimize performance in 2D
This removes the countless small UBO writes we had before and replaces them with a single large write per render pass. This results in much faster rendering on low-end devices but improves speed on all devices.
This commit is contained in:
parent
0c23a2cfe3
commit
154b9c1c91
12 changed files with 744 additions and 507 deletions
|
@ -2875,6 +2875,10 @@ void RenderingServer::init() {
|
|||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64);
|
||||
GLOBAL_DEF("rendering/rendering_device/descriptor_pools/max_descriptors_per_pool", 64);
|
||||
|
||||
// Number of commands that can be drawn per frame.
|
||||
GLOBAL_DEF_RST("rendering/gl_compatibility/item_buffer_size", 16384);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/gl_compatibility/item_buffer_size", PropertyInfo(Variant::INT, "rendering/gl_compatibility/item_buffer_size", PROPERTY_HINT_RANGE, "1024,1048576,1"));
|
||||
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/enabled", true);
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/compress", true);
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/use_zstd_compression", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue