Blender Git Loki

Git Commits -> Revision 9c49e71

Revision 9c49e71 by Sergey Sharybin (master)
April 3, 2013, 15:59 (GMT)
Bunch of fixes for GLSL display transform

- GLSL shader wasn't aware of alpha predivide option,
always assuming alpha is straight. Gave wrong results
when displaying transparent float buffers.

- GLSL display wasn't aware of float buffers with number
of channels different from 4, crashing when trying to
display image with different number of channels.

This required a bit larger changes, namely now it's
possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
to glaDrawPixelsTex, This also implied adding format to
glaDrawPixelsAuto and modifying all places where this
functions are called.

Now GLSL will handle both 3 and 4 channels buffers,
single channel images are handled by CPU.

- Replaced hack for render result displaying with a bit
different hack.

Namely CPU conversion will happen only during render,
once render is done GLSL would be used for displaying
render result on a screen.

This is so because of the way renderer updates parts
of the image -- it happens without respect to active
render layer in image user. This is harmless because
only display buffer is modifying, but this is tricky
because we don't have original buffer opened during
rendering.

One more related fix here was about when rendering
multiple layers, wrong image would be displaying when
rendering is done. Added a signal to invalidate
display buffer once rendering is done (only happens
when using multiple layers). This solves issue with
wrong buffer stuck on the display when using regular
CPU display space transform and if GLSL is available
it'll make image displayed with a GLSL shader.

- As an additional change, byte buffers now also uses
GLSL display transform.

So now only dutehr and RGB curves are stoppers for
using GLSL for all kind of display transforms.

Commit Details:

Full Hash: 9c49e71216c11d3369eb40b8b743c555b032e397
SVN Revision: 55759
Parent Commit: 03b07a7
Lines Changed: +235, -79

17 Modified Paths:

/intern/opencolorio/fallback_impl.cc (+1, -1) (Diff)
/intern/opencolorio/ocio_capi.cc (+2, -2) (Diff)
/intern/opencolorio/ocio_capi.h (+1, -1) (Diff)
/intern/opencolorio/ocio_impl.h (+3, -3) (Diff)
/intern/opencolorio/ocio_impl_glsl.cc (+22, -3) (Diff)
/source/blender/editors/include/BIF_glutil.h (+3, -3) (Diff)
/source/blender/editors/interface/interface_draw.c (+1, -1) (Diff)
/source/blender/editors/render/render_internal.c (+29, -1) (Diff)
/source/blender/editors/screen/glutil.c (+108, -32) (Diff)
/source/blender/editors/space_file/file_draw.c (+1, -1) (Diff)
/source/blender/editors/space_node/drawnode.c (+2, -2) (Diff)
/source/blender/editors/space_node/node_draw.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/drawobject.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+1, -1) (Diff)
/source/blender/imbuf/IMB_colormanagement.h (+12, -4) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+46, -21) (Diff)
/source/blender/windowmanager/intern/wm_dragdrop.c (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021