diff options
author | Matt Ebb <matt@mke3.net> | 2009-07-17 06:43:15 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-07-17 06:43:15 +0400 |
commit | 1ef729358517248888073be71ba5d3b6e3d723ee (patch) | |
tree | dfa33f083ac1afd500e76dcf4bc581394637d0dd /source/blender/blenkernel/BKE_colortools.h | |
parent | 70f6255433fcb1f5551199ef7a285a9ab80a3318 (diff) |
Colour Management
- 1st stage: Linear Workflow
This implements automatic linear workflow in Blender's renderer. With the
new Colour Management option on in the Render buttons, all inputs to the
renderer and compositor are converted to linear colour space before
rendering, and gamma corrected afterwards. In essence, this makes all
manual gamma correction with nodes, etc unnecessary, since it's done
automatically through the pipeline.
It's all explained much better in the notes/doc here, so please have a look:
http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture/Colour_Management
And an example of the sort of difference it makes:
http://mke3.net/blender/devel/rendering/b25_colormanagement_test01.jpg
This also enables Colour Management in the default B.blend, and changes the
default lamp falloff to inverse square, which is more correct, and much
easier to use now it's all gamma corrected properly.
Next step is to look into profiles/soft proofing for the compositor.
Thanks to brecht for reviewing and fixing some oversights!
Diffstat (limited to 'source/blender/blenkernel/BKE_colortools.h')
-rw-r--r-- | source/blender/blenkernel/BKE_colortools.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index 6f6c4a834df..c83a260690b 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -33,7 +33,16 @@ struct CurveMapping; struct CurveMap; struct ImBuf; struct rctf; - + +void gamma_correct_rec709(float *c, float gamma); +void gamma_correct(float *c, float gamma); +float srgb_to_linearrgb(float c); +float linearrgb_to_srgb(float c); +void color_manage_linearize(float *col_to, float *col_from); + +void floatbuf_to_srgb_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w); +void floatbuf_to_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w); + struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy); void curvemapping_free(struct CurveMapping *cumap); struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap); @@ -60,5 +69,6 @@ void curvemapping_initialize(struct CurveMapping *cumap); void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size); void colorcorrection_do_ibuf(struct ImBuf *ibuf, const char *profile); + #endif |