Fix T38633: glsl not working well with mixed cycles/blender material nodes.

This commit is contained in:
2014-02-14 15:11:19 +01:00
parent 8439a165ff
commit a252e27fec
6 changed files with 13 additions and 9 deletions

View File

@@ -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)) {