Eevee: Add support for alpha background in viewport

Viewport now displays alpha checkerboard pattern like Cycles does when
film alpha is set to "Transparent".

Some small workarounds were necessary for Depth of Field and correct TAA
support.
This commit is contained in:
2019-05-01 11:01:01 +02:00
parent 47717060af
commit b581f19292
6 changed files with 62 additions and 3 deletions

View File

@@ -241,6 +241,7 @@ void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_
if (use_alpha) {
DRW_shgroup_uniform_texture_ref(grp, "scatterAlphaBuffer", &effects->dof_blur_alpha);
DRW_shgroup_uniform_bool_copy(grp, "unpremult", DRW_state_is_image_render());
}
}
}