Blender Git Loki

Git Commits -> Revision 08cea96

Revision 08cea96 by Sergey Sharybin (master)
December 31, 2012, 13:52 (GMT)
Alpha premul pipeline cleanup

This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
assumptions.
- There's an input image setting to say whether it's stored with
straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
deliver straight alpha.

Some implementation details:

- Removed scene's color unpremultiply setting, which was very
much confusing and was wrong for default settings.
Now all renderers assumes to deliver premultiplied alpha.

- IMB_buffer_byte_from_float will now linearize alpha when
converting from buffer.

- Sequencer's effects were changed to assume bytes have got
straight alpha. Most of effects will work with bytes still,
however for glow it was more tricky to avoid data loss, so
there's a commented out glow implementation which converts
byte buffer to floats first, operates on floats and returns
bytes back. It's slower and not sure if it should actually
be used -- who're using glow on alpha anyway?

- Sequencer modifiers should also be working nice with straight
bytes now.

- GLSL preview will predivide float textures to make nice shading,
shading with byte textures worked nice (GLSL was assuming straight
alpha).

- Blender Internal will set alpha=1 to the whole sky. The same
happens in Cycles and there's no way to avoid this -- sky is
neither straight nor premul and doesn't fit color pipeline well.

- Straight alpha mode for render result was also eliminated.

- Conversion to correct alpha need to be done before linearizing
float buffer.

- TIFF will now load and save files with proper alpha mode setting
in file meta data header.

- Remove Use Alpha from texture mapping and replaced with image
datablock setting.

Behaves much more predictable and clear from code point of view
and solves possible regressions when non-premultiplied images were
used as textures with ignoring alpha channel.

Commit Details:

Full Hash: 08cea96ab08026ae9a3351b3e5830eda93f3106f
SVN Revision: 53460
Parent Commit: 97c6a55
Lines Changed: +797, -498

48 Modified Paths:

/intern/cycles/blender/addon/properties.py (+1, -1) (Diff)
/release/scripts/startup/bl_ui/properties_scene.py (+0, -1) (Diff)
/release/scripts/startup/bl_ui/properties_texture.py (+0, -1) (Diff)
/release/scripts/startup/bl_ui/space_sequencer.py (+1, -1) (Diff)
/source/blender/blenkernel/BKE_blender.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/image.c (+39, -20) (Diff)
/source/blender/blenkernel/intern/seqeffects.c (+210, -160) (Diff)
/source/blender/blenkernel/intern/seqmodifier.c (+12, -8) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+62, -65) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -1) (Diff)
/source/blender/blenlib/BLI_math_color.h (+7, -0) (Diff)
/source/blender/blenlib/intern/math_color_inline.c (+58, -25) (Diff)
/source/blender/blenloader/intern/readfile.c (+28, -2) (Diff)
/source/blender/blenloader/intern/versioning_legacy.c (+4, -6) (Diff)
/source/blender/collada/DocumentImporter.cpp (+0, -2) (Diff)
/source/blender/editors/render/render_preview.c (+1, -1) (Diff)
/source/blender/editors/space_image/image_buttons.c (+18, -4) (Diff)
/source/blender/gpu/intern/gpu_draw.c (+4, -2) (Diff)
/source/blender/gpu/intern/gpu_material.c (+1, -2) (Diff)
/source/blender/imbuf/IMB_colormanagement.h (+1, -0) (Diff)
/source/blender/imbuf/IMB_imbuf.h (+3, -1) (Diff)
/source/blender/imbuf/IMB_imbuf_types.h (+3, -2) (Diff)
/source/blender/imbuf/intern/cineon/cineon_dpx.c (+3, -0) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+34, -29) (Diff)
/source/blender/imbuf/intern/divers.c (+54, -27) (Diff)
/source/blender/imbuf/intern/filter.c (+64, -0) (Diff)
/source/blender/imbuf/intern/IMB_filter.h (+3, -0) (Diff)
/source/blender/imbuf/intern/openexr/openexr_api.cpp (+3, -0) (Diff)
/source/blender/imbuf/intern/png.c (+12, -9) (Diff)
/source/blender/imbuf/intern/radiance_hdr.c (+3, -0) (Diff)
/source/blender/imbuf/intern/readimage.c (+18, -6) (Diff)
/source/blender/imbuf/intern/scaling.c (+23, -12) (Diff)
/source/blender/imbuf/intern/tiff.c (+38, -14) (Diff)
/source/blender/makesdna/DNA_image_types.h (+12, -2) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+2, -2) (Diff)
/source/blender/makesdna/DNA_sequence_types.h (+11, -2) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_image.c (+24, -11) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+1, -9) (Diff)
/source/blender/makesrna/intern/rna_sequencer.c (+9, -3) (Diff)
/source/blender/makesrna/intern/rna_texture.c (+0, -5) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.c (+1, -2) (Diff)
/source/blender/nodes/composite/node_composite_util.c (+1, -1) (Diff)
/source/blender/render/intern/include/render_result.h (+1, -1) (Diff)
/source/blender/render/intern/source/imagetexture.c (+15, -15) (Diff)
/source/blender/render/intern/source/pipeline.c (+3, -3) (Diff)
/source/blender/render/intern/source/rendercore.c (+2, -31) (Diff)
/source/blender/render/intern/source/render_result.c (+4, -7) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021