[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60659] trunk/blender/source/blender/ render/intern/source/bake.c: Bake vertex colors should include vertex color alpha as well.
Antony Riakiotakis
kalast at gmail.com
Thu Oct 10 14:50:35 CEST 2013
Revision: 60659
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60659
Author: psy-fi
Date: 2013-10-10 12:50:34 +0000 (Thu, 10 Oct 2013)
Log Message:
-----------
Bake vertex colors should include vertex color alpha as well.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/bake.c
Modified: trunk/blender/source/blender/render/intern/source/bake.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/bake.c 2013-10-10 11:58:01 UTC (rev 60658)
+++ trunk/blender/source/blender/render/intern/source/bake.c 2013-10-10 12:50:34 UTC (rev 60659)
@@ -262,14 +262,14 @@
}
else if (bs->type == RE_BAKE_VERTEX_COLORS) {
copy_v3_v3(shr.combined, shi->vcol);
- shr.alpha = 1.0;
+ shr.alpha = shi->vcol[3];
}
}
if (bs->rect_float && !bs->vcol) {
float *col = bs->rect_float + 4 * (bs->rectx * y + x);
copy_v3_v3(col, shr.combined);
- if (bs->type == RE_BAKE_ALL || bs->type == RE_BAKE_TEXTURE) {
+ if (bs->type == RE_BAKE_ALL || bs->type == RE_BAKE_TEXTURE || bs->type == RE_BAKE_VERTEX_COLORS) {
col[3] = shr.alpha;
}
else {
@@ -298,7 +298,7 @@
rgb_float_to_uchar(col, shr.combined);
}
- if (ELEM(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE)) {
+ if (ELEM3(bs->type, RE_BAKE_ALL, RE_BAKE_TEXTURE, RE_BAKE_VERTEX_COLORS)) {
col[3] = FTOCHAR(shr.alpha);
}
else {
More information about the Bf-blender-cvs
mailing list