Blender Git Commit Log
Git Commits -> Revision 8f91508
Revision 8f91508 by Brecht Van Lommel (master) April 27, 2013, 12:51 (GMT) |
Fix part of #34233: bad alpha blending for 2D image painting. This is a very old issue, the formulas here were never quite right, should all work ok now with byte and float images. Some differences: * Colors with zero alpha from the background will never have an influence, so you don't get alpha fringes when painting over such areas. This does give hard edges when looking at the RGB channels alone, but there's no way to avoid that and fringes at the same time, same behavior as other painting apps. * Add/Subtract/Multiply/Lighten/Darken now leave the alpha channel unchanged and work only the RGB channels, again same behavior as many other apps. * Erase/Add alpha now compensates for premultiplied float images to keep the straight RGB colors the same. Next: fix projection painting. |
Commit Details:
Full Hash: 8f9150871c5f41df948d523c51ed04fc689eaf07
SVN Revision: 56337
Parent Commit: a580677
Lines Changed: +570, -89
2 Added Paths:
/source/blender/blenlib/BLI_math_color_blend.h (+71, -0) (View)
/source/blender/blenlib/intern/math_color_blend_inline.c (+413, -0) (View)
/source/blender/blenlib/intern/math_color_blend_inline.c (+413, -0) (View)
12 Modified Paths:
/source/blender/blenkernel/intern/brush.c (+12, -2) (Diff)
/source/blender/blenkernel/intern/image_gen.c (+2, -1) (Diff)
/source/blender/blenkernel/intern/mesh_validate.c (+1, -0) (Diff)
/source/blender/blenlib/BLI_math_color.h (+1, -1) (Diff)
/source/blender/blenlib/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenlib/intern/math_base_inline.c (+1, -1) (Diff)
/source/blender/editors/sculpt_paint/paint_image_2d.c (+5, -4) (Diff)
/source/blender/editors/sculpt_paint/paint_image_proj.c (+12, -12) (Diff)
/source/blender/imbuf/IMB_imbuf.h (+1, -1) (Diff)
/source/blender/imbuf/intern/rectop.c (+47, -67) (Diff)
/source/blender/makesrna/intern/rna_lamp.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_mesh.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/image_gen.c (+2, -1) (Diff)
/source/blender/blenkernel/intern/mesh_validate.c (+1, -0) (Diff)
/source/blender/blenlib/BLI_math_color.h (+1, -1) (Diff)
/source/blender/blenlib/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenlib/intern/math_base_inline.c (+1, -1) (Diff)
/source/blender/editors/sculpt_paint/paint_image_2d.c (+5, -4) (Diff)
/source/blender/editors/sculpt_paint/paint_image_proj.c (+12, -12) (Diff)
/source/blender/imbuf/IMB_imbuf.h (+1, -1) (Diff)
/source/blender/imbuf/intern/rectop.c (+47, -67) (Diff)
/source/blender/makesrna/intern/rna_lamp.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_mesh.c (+1, -0) (Diff)