Cycles: Some minor tweaks to emission sharder
- Nodification of shader nodes changed default strength from 10 to 1. If that was intentional, IMO should happen as a separate commit. - Fixed indentation.
This commit is contained in:
parent
5f95ffe350
commit
183874841b
@ -2323,7 +2323,7 @@ NODE_DEFINE(EmissionNode)
|
|||||||
NodeType* type = NodeType::add("emission", create, NodeType::SHADER);
|
NodeType* type = NodeType::add("emission", create, NodeType::SHADER);
|
||||||
|
|
||||||
SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
|
SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
|
||||||
SOCKET_IN_FLOAT(strength, "Strength", 1.0f);
|
SOCKET_IN_FLOAT(strength, "Strength", 10.0f);
|
||||||
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
|
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
|
||||||
|
|
||||||
SOCKET_OUT_CLOSURE(emission, "Emission");
|
SOCKET_OUT_CLOSURE(emission, "Emission");
|
||||||
@ -2344,7 +2344,7 @@ void EmissionNode::compile(SVMCompiler& compiler)
|
|||||||
if(color_in->link || strength_in->link) {
|
if(color_in->link || strength_in->link) {
|
||||||
compiler.add_node(NODE_EMISSION_WEIGHT,
|
compiler.add_node(NODE_EMISSION_WEIGHT,
|
||||||
compiler.stack_assign(color_in),
|
compiler.stack_assign(color_in),
|
||||||
compiler.stack_assign(strength_in));
|
compiler.stack_assign(strength_in));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
compiler.add_node(NODE_CLOSURE_SET_WEIGHT, color * strength);
|
compiler.add_node(NODE_CLOSURE_SET_WEIGHT, color * strength);
|
||||||
|
Loading…
Reference in New Issue
Block a user