Fix T85261: Eevee passes have slight inaccurate colors
In everything in `EEVEE_renderpasses_postprocess` (or the corresponding renderpass_postprocess_frag.glsl) colors get divided by a 'currentSample'. This 'currentSample' is always incremented in `EEVEE_temporal_sampling_draw` (and also one more time before we reach `EEVEE_renderpasses_postprocess`. This results in a "off-by-one", slightly inacurate colors and slight inaccurate transparency (in certain passes like AOVs). Now decrement the currentSample `EEVEE_renderpasses_postprocess` again by one to compensate. Maniphest Tasks: T85261 Differential Revision: https://developer.blender.org/D10286
This commit is contained in:
@@ -282,7 +282,9 @@ void EEVEE_renderpasses_postprocess(EEVEE_ViewLayerData *UNUSED(sldata),
|
||||
EEVEE_PrivateData *g_data = stl->g_data;
|
||||
EEVEE_EffectsInfo *effects = stl->effects;
|
||||
|
||||
const int current_sample = effects->taa_current_sample;
|
||||
/* Compensate for taa_current_sample being incremented after last drawing in
|
||||
* EEVEE_temporal_sampling_draw. */
|
||||
const int current_sample = effects->taa_current_sample - 1;
|
||||
g_data->renderpass_current_sample = current_sample;
|
||||
g_data->renderpass_type = renderpass_type;
|
||||
g_data->renderpass_postprocess = PASS_POST_UNDEFINED;
|
||||
|
||||
Reference in New Issue
Block a user