Blender Git Commit Log

Git Commits -> Revision 2dff7c0

Revision 2dff7c0 by Sergey Sharybin (master)
March 29, 2013, 16:02 (GMT)
Implement GPU-side display transform for clip editor

Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:

- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
transformation for a giver processor.

This function compiles and links shader, sets up it's
argument. After this transformation would be applied
on an image displaying as a 2D texture.

So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
do a proper color space transform.

- OCIO_finishGLSLDraw restores OpenGL context after all
color-managed display is over.

- OCIO_freeOGLState frees allocated state structure used
for cacheing some GLSL-related stuff.

There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.

Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.

Known issues:
- Texture buffer and GLSL are no longer checking for
video card capabilities, possibly could lead to some
artifacts on crappy drivers/cards.

- Only float buffers are displaying using GLSL, byte
buffers will still use fallback display method.

This is to be addressed later.

- If RGB curves are used as a part of display transform,
GLSL display will also be disabled. This is also thing
to be solved later.

Additional changes:

- glaDrawPixelsTexScaled will now use RGBA16F as an
internal format of storing textures when it's used
to draw float buffer. This is needed so LUT are
applied without precision loss.

Commit Details:

Full Hash: 2dff7c01ada2a645d39c2acdc83a10e4a295b35b
SVN Revision: 55670
Parent Commit: 44a43af
Lines Changed: +728, -220

1 Added Path:

/intern/opencolorio/ocio_impl_glsl.cc (+274, -0) (View)

16 Modified Paths:

/intern/opencolorio/CMakeLists.txt (+1, -0) (Diff)
/intern/opencolorio/fallback_impl.cc (+12, -0) (Diff)
/intern/opencolorio/ocio_capi.cc (+15, -0) (Diff)
/intern/opencolorio/ocio_capi.h (+6, -0) (Diff)
/intern/opencolorio/ocio_impl.cc (+235, -0) (Diff)
/intern/opencolorio/ocio_impl.h (+12, -0) (Diff)
/intern/opencolorio/SConscript (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+0, -1) (Diff)
/source/blender/editors/include/ED_clip.h (+1, -6) (Diff)
/source/blender/editors/screen/glutil.c (+9, -0) (Diff)
/source/blender/editors/space_clip/clip_draw.c (+65, -48) (Diff)
/source/blender/editors/space_clip/clip_editor.c (+1, -160) (Diff)
/source/blender/editors/space_clip/space_clip.c (+0, -3) (Diff)
/source/blender/imbuf/IMB_colormanagement.h (+8, -0) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+88, -0) (Diff)
/source/blender/makesdna/DNA_space_types.h (+0, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021