Fix T98972: EEVEE Bloom Pass Outputs Final Image Instead of Bloom.

Regression introduced by {rBca37654b6327}. This commit reversed the
order of loading uniforms. The bloom renderpass used the previous
loading order to overwrite an existing uniform (bloomBaseAdd).

Due to the new ordering this doesn't work anymore where the render
pass outputted an image similar to the final image. This was fixed
by loading the correct value for bloomAddBase and remove the rewrite.
This commit is contained in:
Jeroen Bakker 2022-06-21 08:20:26 +02:00
parent beaae4533a
commit 3df6e75a26
Notes: blender-bot 2023-02-14 11:00:17 +01:00
Referenced by issue #98972, Regression: 3.2 EEVEE Bloom Pass Outputs Final Image Instead of Bloom Only
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 10 additions and 3 deletions

View File

@ -125,7 +125,8 @@ static DRWShadingGroup *eevee_create_bloom_pass(const char *name,
struct GPUShader *sh,
DRWPass **pass,
bool upsample,
bool resolve)
bool resolve,
bool resolve_add_base)
{
struct GPUBatch *quad = DRW_cache_fullscreen_quad_get();
@ -141,7 +142,7 @@ static DRWShadingGroup *eevee_create_bloom_pass(const char *name,
}
if (resolve) {
DRW_shgroup_uniform_vec3(grp, "bloomColor", effects->bloom_color, 1);
DRW_shgroup_uniform_bool_copy(grp, "bloomAddBase", true);
DRW_shgroup_uniform_bool_copy(grp, "bloomAddBase", resolve_add_base);
}
return grp;
@ -193,18 +194,21 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
EEVEE_shaders_bloom_downsample_get(use_antiflicker),
&psl->bloom_downsample_first,
false,
false,
false);
eevee_create_bloom_pass("Bloom Downsample",
effects,
EEVEE_shaders_bloom_downsample_get(false),
&psl->bloom_downsample,
false,
false,
false);
eevee_create_bloom_pass("Bloom Upsample",
effects,
EEVEE_shaders_bloom_upsample_get(use_highres),
&psl->bloom_upsample,
true,
false,
false);
grp = eevee_create_bloom_pass("Bloom Blit",
@ -212,6 +216,7 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
EEVEE_shaders_bloom_blit_get(use_antiflicker),
&psl->bloom_blit,
false,
false,
false);
DRW_shgroup_uniform_vec4(grp, "curveThreshold", effects->bloom_curve_threshold, 1);
DRW_shgroup_uniform_float(grp, "clampIntensity", &effects->bloom_clamp, 1);
@ -221,6 +226,7 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
EEVEE_shaders_bloom_resolve_get(use_highres),
&psl->bloom_resolve,
true,
true,
true);
}
}
@ -309,7 +315,8 @@ void EEVEE_bloom_output_init(EEVEE_ViewLayerData *UNUSED(sldata),
EEVEE_shaders_bloom_resolve_get(use_highres),
&psl->bloom_accum_ps,
true,
true);
true,
false);
DRW_shgroup_uniform_bool_copy(grp, "bloomAddBase", false);
}