diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-26 13:12:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-26 13:12:10 +0400 |
commit | 77b7ba0bfb6c5fd479a93118b681d6649796ea02 (patch) | |
tree | 62c657b59b1c8e0a3fc9522a533832256e197ed7 /source/blender/editors | |
parent | f647ba1ce59e33dc6b7e1604ee6a34d6802b3742 (diff) |
fix for dark images from the sequencer when color management is disabled.
the render engine assumes the RenderResult's rectf is not in linear color space when color management is disabled so the sequencer and opengl render need to follow this else it results in dark images.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index c0e6ea66bc4..de32efde452 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -116,6 +116,17 @@ static void screen_opengl_render_apply(OGLRender *oglrender) rr= RE_AcquireResultRead(oglrender->re); + /* note on color management: + * looked into how best to deal with color management here and found heres how it should work. + * + * OpenGL materials etc are color corrected, so a float buffer from the graphics card is + * color corrected, without running any conversion functions. + * + * With color correction disabled blender expects the rr->rectf to be non-color managed so + * just do a direct copy from the byte array to the rectf with no conversion too. + * notice IMB_float_from_rect has the profile set so no conversion is done. + */ + if(view_context) { GPU_offscreen_bind(oglrender->ofs); /* bind */ @@ -134,6 +145,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) } else { ImBuf *ibuf_view= ED_view3d_draw_offscreen_imbuf_simple(scene, oglrender->sizex, oglrender->sizey, OB_SOLID); + ibuf_view->profile = IB_PROFILE_NONE; /* ensures no conversion!, see note above */ IMB_float_from_rect(ibuf_view); memcpy(rr->rectf, ibuf_view->rect_float, sizeof(float) * 4 * oglrender->sizex * oglrender->sizey); |