diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-12-26 22:11:10 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-12-26 22:23:22 +1100 |
commit | 8bf16b0ce5ab57d2318e31d3f58b7283b27c005f (patch) | |
tree | 2283547aba7bf80d601f62736e8e7dadb5446e75 /servers/rendering/renderer_rd/storage_rd | |
parent | f7cf9fb148140b86ee5795110373a0d55ff32860 (diff) |
Fix errors related to reflection probe now using a render buffers object
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp b/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp index fd7b62cd6c..12ba29a0b8 100644 --- a/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp +++ b/servers/rendering/renderer_rd/storage_rd/render_scene_buffers_rd.cpp @@ -202,6 +202,7 @@ void RenderSceneBuffersRD::configure(RID p_render_target, const Size2i p_interna vrs_texture = create_texture(RB_SCOPE_VRS, RB_TEXTURE, RD::DATA_FORMAT_R8_UINT, usage_bits, RD::TEXTURE_SAMPLES_1, vrs->get_vrs_texture_size(internal_size)); } + // (re-)configure any named buffers for (KeyValue<StringName, Ref<RenderBufferCustomDataRD>> &E : data_buffers) { E.value->configure(this); } @@ -220,6 +221,14 @@ void RenderSceneBuffersRD::configure_for_reflections(const Size2i p_reflection_s use_taa = false; use_debanding = false; view_count = 1; + + // cleanout any old buffers we had. + cleanup(); + + // (re-)configure any named buffers + for (KeyValue<StringName, Ref<RenderBufferCustomDataRD>> &E : data_buffers) { + E.value->configure(this); + } } void RenderSceneBuffersRD::set_fsr_sharpness(float p_fsr_sharpness) { @@ -498,10 +507,6 @@ void RenderSceneBuffersRD::set_custom_data(const StringName &p_name, Ref<RenderB } Ref<RenderBufferCustomDataRD> RenderSceneBuffersRD::get_custom_data(const StringName &p_name) const { - if (!data_buffers.has(p_name)) { - print_line("test"); - } - ERR_FAIL_COND_V(!data_buffers.has(p_name), Ref<RenderBufferCustomDataRD>()); Ref<RenderBufferCustomDataRD> ret = data_buffers[p_name]; |