EEVEE-Next: Allow raytacing for translucent BSDF without refraction

This was an oversight. It was working when adding refraction
which made the check pass.
But this only allows raytracing using screen tracing with
raytraced refraction turned on.
Horizon Scan is still not compatible with transmission.
This commit is contained in:
Clément Foucault
2024-04-04 21:02:52 +02:00
parent 274d7c6d12
commit 7f68026990

View File

@@ -693,7 +693,8 @@ 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_refraction = !is_first_pass &&
(closure_bits_ & (CLOSURE_REFRACTION | CLOSURE_TRANSLUCENT));
bool do_screen_space_reflection = (closure_bits_ & (CLOSURE_REFLECTION | CLOSURE_DIFFUSE));
constexpr eGPUTextureUsage usage_read = GPU_TEXTURE_USAGE_SHADER_READ;
constexpr eGPUTextureUsage usage_write = GPU_TEXTURE_USAGE_SHADER_WRITE;