Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-10-10 16:50:34 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-10-10 16:50:34 +0400
commit33894a4cd528f8fed74f81ed4e5f5a33435130e9 (patch)
treea39a92e8eb09ec5483c39ae8b8930800bc0b7fc2 /source/blender/render
parent4bd40372769e9ebf078dadb0442366176e8990e6 (diff)
Bake vertex colors should include vertex color alpha as well.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/bake.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/bake.c b/source/blender/render/intern/source/bake.c
index 70659e09ab1..72e47f89bb2 100644
--- a/source/blender/render/intern/source/bake.c
+++ b/source/blender/render/intern/source/bake.c
@@ -262,14 +262,14 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
}
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 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
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 {