diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-01 22:30:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-01 22:56:42 +0300 |
commit | 9a63fa21eb45038ce747748156da61b14213d6c7 (patch) | |
tree | 7e954222ff84e0286fb922da991b2a51ed3c4c1d /source/blender/draw/engines/eevee | |
parent | 81fc55f563a909e4011bd4dc4c078ab292be3a17 (diff) |
Color management: change view transform for color pickers and display modes.
* Use simple default view transform for color pickers, as Filmic does not work
well for all types of colors. We better handle this with an option and tagging
of colors as emissive or albedo like.
* For solid/workbench we also no longer use Filmic, as there is not enough contrast
and it's not really needed since this is not physically based lighting.
* For lookdev always take into account the view transform and look. Other view
settings like exposure are only taken into account if scene lighting is used,
since these are often dependent on scene light intensity.
Fixes T61022, T57649, T59363.
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_engine.c | 24 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index cea89f531ac..6120a036deb 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -53,7 +53,7 @@ static void eevee_engine_init(void *ved) /* Alloc transient pointers */ stl->g_data = MEM_callocN(sizeof(*stl->g_data), __func__); } - stl->g_data->use_color_view_settings = USE_SCENE_LIGHT(v3d) || !LOOK_DEV_STUDIO_LIGHT_ENABLED(v3d); + stl->g_data->use_color_render_settings = USE_SCENE_LIGHT(v3d) || !LOOK_DEV_STUDIO_LIGHT_ENABLED(v3d); stl->g_data->background_alpha = DRW_state_draw_background() ? 1.0f : 0.0f; stl->g_data->valid_double_buffer = (txl->color_double_buffer != NULL); stl->g_data->valid_taa_history = (txl->taa_history != NULL); @@ -308,39 +308,39 @@ static void eevee_draw_background(void *vedata) /* Tonemapping and transfer result to default framebuffer. */ - bool use_view_settings = stl->g_data->use_color_view_settings; + bool use_render_settings = stl->g_data->use_color_render_settings; GPU_framebuffer_bind(dfbl->default_fb); - DRW_transform_to_display(stl->effects->final_tx, use_view_settings); + DRW_transform_to_display(stl->effects->final_tx, true, use_render_settings); /* Debug : Output buffer to view. */ switch (G.debug_value) { case 1: - if (txl->maxzbuffer) DRW_transform_to_display(txl->maxzbuffer, use_view_settings); + if (txl->maxzbuffer) DRW_transform_to_display(txl->maxzbuffer, false, false); break; case 2: - if (effects->ssr_pdf_output) DRW_transform_to_display(effects->ssr_pdf_output, use_view_settings); + if (effects->ssr_pdf_output) DRW_transform_to_display(effects->ssr_pdf_output, false, false); break; case 3: - if (effects->ssr_normal_input) DRW_transform_to_display(effects->ssr_normal_input, use_view_settings); + if (effects->ssr_normal_input) DRW_transform_to_display(effects->ssr_normal_input, false, false); break; case 4: - if (effects->ssr_specrough_input) DRW_transform_to_display(effects->ssr_specrough_input, use_view_settings); + if (effects->ssr_specrough_input) DRW_transform_to_display(effects->ssr_specrough_input, false, false); break; case 5: - if (txl->color_double_buffer) DRW_transform_to_display(txl->color_double_buffer, use_view_settings); + if (txl->color_double_buffer) DRW_transform_to_display(txl->color_double_buffer, false, false); break; case 6: - if (effects->gtao_horizons_debug) DRW_transform_to_display(effects->gtao_horizons_debug, use_view_settings); + if (effects->gtao_horizons_debug) DRW_transform_to_display(effects->gtao_horizons_debug, false, false); break; case 7: - if (effects->gtao_horizons) DRW_transform_to_display(effects->gtao_horizons, use_view_settings); + if (effects->gtao_horizons) DRW_transform_to_display(effects->gtao_horizons, false, false); break; case 8: - if (effects->sss_data) DRW_transform_to_display(effects->sss_data, use_view_settings); + if (effects->sss_data) DRW_transform_to_display(effects->sss_data, false, false); break; case 9: - if (effects->velocity_tx) DRW_transform_to_display(effects->velocity_tx, use_view_settings); + if (effects->velocity_tx) DRW_transform_to_display(effects->velocity_tx, false, false); break; default: break; diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index df107e55fff..d2e38f4a3ce 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -815,7 +815,7 @@ typedef struct EEVEE_PrivateData { float mist_start, mist_inv_dist, mist_falloff; /* Color Management */ - bool use_color_view_settings; + bool use_color_render_settings; } EEVEE_PrivateData; /* Transient data */ /* eevee_data.c */ |