Cycles: Set default closure values to some of the nodes
Previously it was only set at compilation time which is all fine but does not let us to check which closure the node corresponds to prior to the compilation.
This commit is contained in:
@@ -1609,6 +1609,7 @@ ShaderEnum AnisotropicBsdfNode::distribution_enum = aniso_distribution_init();
|
|||||||
|
|
||||||
AnisotropicBsdfNode::AnisotropicBsdfNode()
|
AnisotropicBsdfNode::AnisotropicBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_MICROFACET_GGX_ANISO_ID;
|
||||||
distribution = ustring("GGX");
|
distribution = ustring("GGX");
|
||||||
|
|
||||||
add_input("Tangent", SHADER_SOCKET_VECTOR, ShaderInput::TANGENT);
|
add_input("Tangent", SHADER_SOCKET_VECTOR, ShaderInput::TANGENT);
|
||||||
@@ -1661,6 +1662,7 @@ ShaderEnum GlossyBsdfNode::distribution_enum = glossy_distribution_init();
|
|||||||
|
|
||||||
GlossyBsdfNode::GlossyBsdfNode()
|
GlossyBsdfNode::GlossyBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_MICROFACET_GGX_ID;
|
||||||
distribution = ustring("GGX");
|
distribution = ustring("GGX");
|
||||||
|
|
||||||
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.2f);
|
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.2f);
|
||||||
@@ -1699,6 +1701,7 @@ ShaderEnum GlassBsdfNode::distribution_enum = glass_distribution_init();
|
|||||||
|
|
||||||
GlassBsdfNode::GlassBsdfNode()
|
GlassBsdfNode::GlassBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_SHARP_GLASS_ID;
|
||||||
distribution = ustring("Sharp");
|
distribution = ustring("Sharp");
|
||||||
|
|
||||||
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.0f);
|
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.0f);
|
||||||
@@ -1738,6 +1741,7 @@ ShaderEnum RefractionBsdfNode::distribution_enum = refraction_distribution_init(
|
|||||||
|
|
||||||
RefractionBsdfNode::RefractionBsdfNode()
|
RefractionBsdfNode::RefractionBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_REFRACTION_ID;
|
||||||
distribution = ustring("Sharp");
|
distribution = ustring("Sharp");
|
||||||
|
|
||||||
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.0f);
|
add_input("Roughness", SHADER_SOCKET_FLOAT, 0.0f);
|
||||||
@@ -1776,6 +1780,7 @@ ShaderEnum ToonBsdfNode::component_enum = toon_component_init();
|
|||||||
|
|
||||||
ToonBsdfNode::ToonBsdfNode()
|
ToonBsdfNode::ToonBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_DIFFUSE_TOON_ID;
|
||||||
component = ustring("Diffuse");
|
component = ustring("Diffuse");
|
||||||
|
|
||||||
add_input("Size", SHADER_SOCKET_FLOAT, 0.5f);
|
add_input("Size", SHADER_SOCKET_FLOAT, 0.5f);
|
||||||
@@ -2135,6 +2140,7 @@ ShaderEnum HairBsdfNode::component_enum = hair_component_init();
|
|||||||
|
|
||||||
HairBsdfNode::HairBsdfNode()
|
HairBsdfNode::HairBsdfNode()
|
||||||
{
|
{
|
||||||
|
closure = CLOSURE_BSDF_HAIR_REFLECTION_ID;
|
||||||
component = ustring("Reflection");
|
component = ustring("Reflection");
|
||||||
|
|
||||||
add_input("Offset", SHADER_SOCKET_FLOAT);
|
add_input("Offset", SHADER_SOCKET_FLOAT);
|
||||||
|
Reference in New Issue
Block a user