Code refactor: reduce special node types, use generic constant folding.

This commit is contained in:
Brecht Van Lommel
2016-05-02 00:05:16 +02:00
parent 2cfadecf97
commit dd8bfa0929
9 changed files with 200 additions and 269 deletions

View File

@@ -365,7 +365,7 @@ uint SVMCompiler::attribute(AttributeStandard std)
bool SVMCompiler::node_skip_input(ShaderNode * /*node*/, ShaderInput *input)
{
/* nasty exception .. */
if(current_type == SHADER_TYPE_DISPLACEMENT && input->link && input->link->parent->name == ustring("bump"))
if(current_type == SHADER_TYPE_DISPLACEMENT && input->link && input->link->parent->special_type == SHADER_SPECIAL_TYPE_BUMP)
return true;
return false;