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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-14 18:11:19 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-14 18:11:58 +0400
commita252e27fec16e09efe873a6bbbd29b3ad5d4c67f (patch)
treef5f98df5363c83acdc51b911f55261f5fe334f9c /source/blender/gpu
parent8439a165ff50a6b3f690c04347aae8a253e08ca2 (diff)
Fix T38633: glsl not working well with mixed cycles/blender material nodes.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_material.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 2781437225b..608c498bd1e 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1592,7 +1592,10 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma)
if (!(scene->gm.flag & GAME_GLSL_NO_NODES) && ma->nodetree && ma->use_nodes) {
/* create nodes */
- ntreeGPUMaterialNodes(ma->nodetree, mat);
+ if (BKE_scene_use_new_shading_nodes(scene))
+ ntreeGPUMaterialNodes(ma->nodetree, mat, NODE_NEW_SHADING);
+ else
+ ntreeGPUMaterialNodes(ma->nodetree, mat, NODE_OLD_SHADING);
}
else {
if (BKE_scene_use_new_shading_nodes(scene)) {