1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Optimize RenderForwardClustered::_setup_render_pass_uniform_set by reducing Vector allocations during push_back operations

This commit is contained in:
CrazyRoka
2024-07-14 22:13:57 +01:00
committed by Rémi Verschelde
parent 893bbdfde8
commit d9ef826c54
14 changed files with 53 additions and 36 deletions

View File

@@ -464,7 +464,8 @@ void SSEffects::downsample_depth(Ref<RenderSceneBuffersRD> p_render_buffers, uin
if (use_mips) {
// Grab our downsample uniform set from cache, these are automatically cleaned up if the depth textures are cleared.
// This also ensures we can switch between left eye and right eye uniform sets without recreating the uniform twice a frame.
Vector<RD::Uniform> u_depths;
thread_local LocalVector<RD::Uniform> u_depths;
u_depths.clear();
// Note, use_full_mips is true if either SSAO or SSIL uses half size, but the other full size and we're using mips.
// That means we're filling all 5 levels.