Shading: Refactor Math node and use dynamic inputs.
- Implement dynamic inputs. The second input is now unavailable in single operand math operators. - Reimplemenet the clamp option using graph expansion for Cycles. - Clean up code and unify naming between Blender and Cycles. - Remove unused code. Reviewers: brecht Differential Revision: https://developer.blender.org/D5481
This commit is contained in:
@@ -1260,11 +1260,12 @@ class MathNode : public ShaderNode {
|
||||
{
|
||||
return NODE_GROUP_LEVEL_1;
|
||||
}
|
||||
void expand(ShaderGraph *graph);
|
||||
void constant_fold(const ConstantFolder &folder);
|
||||
|
||||
float value1;
|
||||
float value2;
|
||||
NodeMath type;
|
||||
NodeMathType type;
|
||||
bool use_clamp;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user