Cycles: support for mask layers in render layer, this has the same effect as
[blender.git] / intern / cycles / render / shader.cpp
index 12968a79ab2b26d343ea2056b29d0595adfc8dbd..2afa1dd5037d8958e26ea88a67fb05406b5da25c 100644 (file)
@@ -256,6 +256,22 @@ void ShaderManager::add_default(Scene *scene)
                scene->shaders.push_back(shader);
                scene->default_background = scene->shaders.size() - 1;
        }
+
+       /* default holdout */
+       {
+               graph = new ShaderGraph();
+
+               closure = graph->add(new HoldoutNode());
+               out = graph->output();
+
+               graph->connect(closure->output("Holdout"), out->input("Surface"));
+
+               shader = new Shader();
+               shader->name = "default_holdout";
+               shader->graph = graph;
+               scene->shaders.push_back(shader);
+               scene->default_holdout = scene->shaders.size() - 1;
+       }
 }
 
 CCL_NAMESPACE_END