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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-09-25 18:36:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-25 18:37:39 +0300
commit02b789642310f55845ef4e7facc7c2659815bb25 (patch)
tree8925d6961d8982591cdded53fd5cbd3e34e965e4 /source
parent0419d3bb014bf9c3bbbb420c89f1ba2b3b15a579 (diff)
Fix T46260: Shadeless option ignores Object-Color
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 39dfa48d3f1..91f9723897c 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1815,7 +1815,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
shr->combined[1]= shi->g;
shr->combined[2]= shi->b;
shr->alpha= shi->alpha;
- return;
+ goto finally_shadeless;
}
if ( (ma->mode & (MA_VERTEXCOL|MA_VERTEXCOLP))== MA_VERTEXCOL ) { /* vertexcolor light */
@@ -2006,7 +2006,11 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
add_v3_v3(shr->combined, shr->emit);
if (shi->combinedflag & SCE_PASS_SPEC)
add_v3_v3(shr->combined, shr->spec);
-
+
+
+ /* Last section of this function applies to shadeless colors too */
+finally_shadeless:
+
/* modulate by the object color */
if ((ma->shade_flag & MA_OBCOLOR) && shi->obr->ob) {
if (!(ma->sss_flag & MA_DIFF_SSS) || !sss_pass_done(&R, ma)) {