Fix T52046: View transform applied twice w/ GL render

Patch from @sergey w/ minor edit.
This commit is contained in:
Campbell Barton 2017-09-08 03:52:31 +10:00
parent a133b74709
commit df58d6bf76
Notes: blender-bot 2023-02-14 06:48:41 +01:00
Referenced by issue #52046, Filmic not working on rendered frame in EEVEE
1 changed files with 5 additions and 1 deletions

View File

@ -2388,8 +2388,12 @@ void DRW_transform_to_display(GPUTexture *tex)
{
Scene *scene = DST.draw_ctx.scene;
/* View transform is already applied for offscreen, don't apply again, see: T52046 */
ColorManagedViewSettings *view_settings =
(DST.options.is_image_render && !DST.options.is_scene_render) ?
NULL : &scene->view_settings;
use_ocio = IMB_colormanagement_setup_glsl_draw_from_space(
&scene->view_settings, &scene->display_settings, NULL, dither, false);
view_settings, &scene->display_settings, NULL, dither, false);
}
if (!use_ocio) {