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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-09-07 00:50:31 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-09-07 00:50:31 +0400
commit3a47c1a9d3eeaafce6efa4ef570583b6aba477cb (patch)
tree540f0e766622b05a1c5285a63ae3852d4fbc3cb6
parente44c49d89d67038657cdcbd373e64b9a17b6c993 (diff)
Fix T40507: Blender Internal Render's Gather don't use node's emit color.
Node was simply ignored by occ shading (noted as TODO), though it's a mere matter of a very few lines of code, nowadays... Just copied from similar task in bake code.
-rw-r--r--source/blender/render/intern/source/occlusion.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index f0fe5d054f0..0c6341fe9e5 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -45,6 +45,7 @@
#include "BLF_translation.h"
+#include "BKE_node.h"
#include "BKE_scene.h"
@@ -194,14 +195,19 @@ static void occ_shade(ShadeSample *ssamp, ObjectInstanceRen *obi, VlakRen *vlr,
}
/* init material vars */
- /* note, keep this synced with render_types.h */
- memcpy(&shi->r, &shi->mat->r, 23 * sizeof(float));
- shi->har = shi->mat->har;
-
+ shade_input_init_material(shi);
+
/* render */
shade_input_set_shade_texco(shi);
- shade_material_loop(shi, shr); /* todo: nodes */
-
+
+ if (shi->mat->nodetree && shi->mat->use_nodes) {
+ ntreeShaderExecTree(shi->mat->nodetree, shi, shr);
+ shi->mat = vlr->mat; /* shi->mat is being set in nodetree */
+ }
+ else {
+ shade_material_loop(shi, shr);
+ }
+
copy_v3_v3(rad, shr->combined);
}