Fix: EEVEE-Next: Undefined behavior with only diffuse material

Diffuse materials still needs the feedback buffer for correct
horizon scan.
This commit is contained in:
Clément Foucault
2023-12-11 18:24:40 +01:00
parent 5fa44c0ff8
commit 4c14557424

View File

@@ -620,7 +620,7 @@ void DeferredLayer::render(View &main_view,
/* The first pass will never have any surfaces behind it. Nothing is refracted except the
* environment. So in this case, disable tracing and fallback to probe. */
bool do_screen_space_refraction = !is_first_pass && (closure_bits_ & CLOSURE_REFRACTION);
bool do_screen_space_reflection = (closure_bits_ & CLOSURE_REFLECTION);
bool do_screen_space_reflection = (closure_bits_ & (CLOSURE_REFLECTION | CLOSURE_DIFFUSE));
eGPUTextureUsage usage_rw = GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_SHADER_WRITE;
if (do_screen_space_reflection) {