1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Fix uniform buffer being created every frame is SSAO and SSIL half_size is different

This commit is contained in:
Bastiaan Olij
2022-09-13 17:49:32 +10:00
parent 16228ba3e2
commit 873366cb2d
2 changed files with 11 additions and 0 deletions

View File

@@ -443,6 +443,11 @@ void SSEffects::downsample_depth(RID p_depth_buffer, const Vector<RID> &p_depth_
RD::get_singleton()->draw_command_begin_label("Downsample Depth");
if (p_invalidate_uniform_set || use_full_mips != ss_effects.used_full_mips_last_frame || use_half_size != ss_effects.used_half_size_last_frame || use_mips != ss_effects.used_mips_last_frame) {
if (ss_effects.downsample_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(ss_effects.downsample_uniform_set)) {
RD::get_singleton()->free(ss_effects.downsample_uniform_set);
ss_effects.downsample_uniform_set = RID();
}
Vector<RD::Uniform> uniforms;
{
RD::Uniform u;
@@ -516,6 +521,7 @@ void SSEffects::downsample_depth(RID p_depth_buffer, const Vector<RID> &p_depth_
ss_effects.used_full_mips_last_frame = use_full_mips;
ss_effects.used_half_size_last_frame = use_half_size;
ss_effects.used_mips_last_frame = use_mips;
}
/* SSIL */