Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(357)

Issue 13810046: Curve mapping implemented in display transform GLSL shader (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by sergey.vfx
Modified:
12 years ago
Reviewers:
brechtvl
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

This patch adds support of curve mapping applied on GPU when having image draw method set to GLSL. This also makes rendered viewport aware of display's transform curve mapping. Almost all of the new code in the shader is a 1:1 copy of evaluation functions from colortools.c. Passing curve mapping to a GLSL shader is not as small and easy how i would imagine it to be, but couldn't find easier way to do it. So for now it's like dozen of uniform parameters to be filled in. As an addition, made it so display transform GLSL shader is data-to-c'ed instead of being hardcoded as a string to the .cc file. TODO: - curvemapping_evaluateRGBF could be zapped from the shader. - texelFetch works awesome, but doesn't exist on my intel card. texture1D gives some darkening which i couldn't figure out yet.

Patch Set 1 #

Patch Set 2 : Darkening seems to be solved #

Total comments: 2

Patch Set 3 : Move curve mapping into #ifdef #

Patch Set 4 : Initial dIther implementation :) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+502 lines, -98 lines) Patch
SConstruct View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
intern/opencolorio/CMakeLists.txt View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
intern/opencolorio/SConscript View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
intern/opencolorio/fallback_impl.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
intern/opencolorio/gpu_shader_display_transform.glsl View 1 2 3 1 chunk +165 lines, -0 lines 0 comments Download
intern/opencolorio/ocio_capi.h View 1 2 3 2 chunks +58 lines, -1 line 0 comments Download
intern/opencolorio/ocio_capi.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
intern/opencolorio/ocio_impl.h View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
intern/opencolorio/ocio_impl_glsl.cc View 1 2 3 9 chunks +137 lines, -44 lines 0 comments Download
source/blender/editors/render/render_internal.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
source/blender/editors/screen/glutil.c View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download
source/blender/editors/space_sequencer/sequencer_draw.c View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
source/blender/imbuf/IMB_colormanagement.h View 1 2 3 1 chunk +6 lines, -9 lines 0 comments Download
source/blender/imbuf/intern/colormanagement.c View 1 2 3 9 chunks +104 lines, -26 lines 0 comments Download
source/blender/makesrna/intern/rna_render.c View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 11
sergey.vfx
12 years ago (2013-09-24 20:14:26 UTC) #1
sergey.vfx
Darkening seems to be solved
12 years ago (2013-09-30 12:12:34 UTC) #2
brechtvl
Some comments, looks good to me overall. https://codereview.appspot.com/13810046/diff/5001/intern/opencolorio/gpu_shader_display_transform.glsl File intern/opencolorio/gpu_shader_display_transform.glsl (right): https://codereview.appspot.com/13810046/diff/5001/intern/opencolorio/gpu_shader_display_transform.glsl#newcode30 intern/opencolorio/gpu_shader_display_transform.glsl:30: + * ...
12 years ago (2013-10-01 19:03:04 UTC) #3
sergey.vfx
Move curve mapping into #ifdef
12 years ago (2013-10-02 08:22:58 UTC) #4
sergey.vfx
On 2013/10/01 19:03:04, brechtvl wrote: > Some comments, looks good to me overall. > > ...
12 years ago (2013-10-02 08:24:22 UTC) #5
brechtvl
LGTM
12 years ago (2013-10-02 12:20:27 UTC) #6
sergey.vfx
Initial dIther implementation :)
12 years ago (2013-10-04 12:23:48 UTC) #7
sergey.vfx
Brecht, will bother you bit more.. Added some kind of dither to gpu. Uses some ...
12 years ago (2013-10-04 12:26:19 UTC) #8
brechtvl
On 2013/10/04 12:26:19, sergey.vfx wrote: > Brecht, will bother you bit more.. > > Added ...
12 years ago (2013-10-09 14:26:15 UTC) #9
brechtvl
This GLSL shader didn't work on my macbook with pretty new GT 650M. It seems ...
12 years ago (2013-10-09 14:28:06 UTC) #10
sergey.vfx
12 years ago (2013-10-09 15:59:24 UTC) #11
On 2013/10/09 14:28:06, brechtvl wrote:
> This GLSL shader didn't work on my macbook with pretty new GT 650M. It seems
OS
> X doesn't support GLSL version 1.3 yet here (only with OpenGL core profile for
> which we can't use any deprecated OpenGL functions ...). Maybe it should pass
> the texture size as uniforms instead of using textureSize.

Yeah, but passing texture size is not so much flexible :( Will figure this out
anyway.

Commited curve mapping to svn now, think dither is easier to be handled
separately.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b