Fix #132611: EEVEE: Background disappear when using forward shaded volumes

In case forward shaded volumes are used the background can turn black.
This is because in this case an incorrect framebuffer could be bound.

Pull Request: https://projects.blender.org/blender/blender/pulls/132678
This commit is contained in:
Jeroen Bakker
2025-01-06 15:13:58 +01:00
parent 13b5e4f025
commit 7db07fcc0b
3 changed files with 4 additions and 3 deletions

View File

@@ -78,8 +78,9 @@ void BackgroundPipeline::clear(View &view)
inst_.manager->submit(clear_ps_, view);
}
void BackgroundPipeline::render(View &view)
void BackgroundPipeline::render(View &view, Framebuffer &combined_fb)
{
GPU_framebuffer_bind(combined_fb);
inst_.manager->submit(world_ps_, view);
}

View File

@@ -44,7 +44,7 @@ class BackgroundPipeline {
void sync(GPUMaterial *gpumat, float background_opacity, float background_blur);
void clear(View &view);
void render(View &view);
void render(View &view, Framebuffer &combined_fb);
};
/** \} */

View File

@@ -136,7 +136,7 @@ void ShadingView::render()
rt_buffer_opaque_,
rt_buffer_refract_);
inst_.pipelines.background.render(render_view_);
inst_.pipelines.background.render(render_view_, combined_fb_);
inst_.gbuffer.release();