Eevee: Fix TAA color drifting.
This was caused by small float precision being insuficient. The blue component of R11F_G11F_B10F has lower precision than the other 2 components. This resulted in colors drifting towards a yellowish tone. Using RGBA16F for the concerned buffer. This double the memory usage of the framebuffers and add subsequent bandwidth usage.
This commit is contained in:
parent
12fa6750f5
commit
9f3c7c75b7
|
@ -599,7 +599,7 @@ void EEVEE_effects_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata)
|
|||
/* Only allocate if at least one effect is activated */
|
||||
if (effects->enabled_effects != 0) {
|
||||
/* Ping Pong buffer */
|
||||
DRWFboTexture tex = {&txl->color_post, DRW_TEX_RGB_11_11_10, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
DRWFboTexture tex = {&txl->color_post, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
|
||||
DRW_framebuffer_init(&fbl->effect_fb, &draw_engine_eevee_type,
|
||||
(int)viewport_size[0], (int)viewport_size[1],
|
||||
|
@ -853,7 +853,7 @@ void EEVEE_effects_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata)
|
|||
|
||||
/* Setup double buffer so we can access last frame as it was before post processes */
|
||||
if ((effects->enabled_effects & EFFECT_DOUBLE_BUFFER) != 0) {
|
||||
DRWFboTexture tex_double_buffer = {&txl->color_double_buffer, DRW_TEX_RGB_11_11_10, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
DRWFboTexture tex_double_buffer = {&txl->color_double_buffer, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
|
||||
DRW_framebuffer_init(&fbl->double_buffer, &draw_engine_eevee_type,
|
||||
(int)viewport_size[0], (int)viewport_size[1],
|
||||
|
|
|
@ -58,7 +58,7 @@ static void EEVEE_engine_init(void *ved)
|
|||
stl->g_data->background_alpha = 1.0f;
|
||||
stl->g_data->valid_double_buffer = (txl->color_double_buffer != NULL);
|
||||
|
||||
DRWFboTexture tex = {&txl->color, DRW_TEX_RGB_11_11_10, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
DRWFboTexture tex = {&txl->color, DRW_TEX_RGBA_16, DRW_TEX_FILTER | DRW_TEX_MIPMAP};
|
||||
|
||||
const float *viewport_size = DRW_viewport_size_get();
|
||||
DRW_framebuffer_init(&fbl->main, &draw_engine_eevee_type,
|
||||
|
|
Loading…
Reference in New Issue