diff options
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_effects.c | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index f4f7acb8862..3a38edecec6 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -171,7 +171,8 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, }); } else { - txl->filtered_radiance = NULL; + DRW_TEXTURE_FREE_SAFE(txl->filtered_radiance); + GPU_FRAMEBUFFER_FREE_SAFE(fbl->radiance_filtered_fb); } /** diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 042fa621117..f05aa562e6b 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -1081,12 +1081,22 @@ void EEVEE_material_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data *v } } if (pd->render_passes & EEVEE_RENDER_PASS_SPECULAR_COLOR) { + bool prev_ssr = sldata->common_data.ssr_toggle; + if (prev_ssr) { + /* We need to disable ssr here so output radiance is not directed to the ssr buffer. */ + sldata->common_data.ssr_toggle = false; + GPU_uniformbuf_update(sldata->common_ubo, &sldata->common_data); + } material_renderpass_accumulate(fbl, material_accum_ps, NULL, pd, txl->spec_color_accum, sldata->renderpass_ubo.spec_color); + if (prev_ssr) { + sldata->common_data.ssr_toggle = prev_ssr; + GPU_uniformbuf_update(sldata->common_ubo, &sldata->common_data); + } } if (pd->render_passes & EEVEE_RENDER_PASS_SPECULAR_LIGHT) { material_renderpass_accumulate(fbl, |