Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Schoen <pascal_schoen@gmx.net>2016-08-03 16:00:25 +0300
committerPascal Schoen <pascal_schoen@gmx.net>2016-08-03 16:00:25 +0300
commitcc267e52f20d036a66aeeff127ee1c856f7c651b (patch)
tree9fd2644dea14643bb4181505ad48ff94c36f7923 /intern/cycles/render
parent81f6c06b1f53180bf32a5c11ac1fa64e2b6abf52 (diff)
Implemented the Disney clearcoat as a variation of the microfacet bsdf,
removed the transparency roughness again and added an input for anisotropic rotations
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/nodes.cpp10
-rw-r--r--intern/cycles/render/nodes.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index cf366367873..c377e899936 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -2226,7 +2226,7 @@ NODE_DEFINE(DisneyBsdfNode)
SOCKET_IN_FLOAT(clearcoatGloss, "ClearcoatGloss", 0.0f);
SOCKET_IN_FLOAT(ior, "IOR", 0.0f);
SOCKET_IN_FLOAT(transparency, "Transparency", 0.0f);
- SOCKET_IN_FLOAT(refractionRoughness, "RefractionRoughness", 0.0f);
+ SOCKET_IN_FLOAT(anisotropicRotation, "AnisotropicRotation", 0.0f);
SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
SOCKET_IN_NORMAL(clearcoatNormal, "ClearcoatNormal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
SOCKET_IN_NORMAL(tangent, "Tangent", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TANGENT);
@@ -2247,7 +2247,7 @@ DisneyBsdfNode::DisneyBsdfNode()
void DisneyBsdfNode::compile(SVMCompiler& compiler, ShaderInput *metallic, ShaderInput *subsurface,
ShaderInput *specular, ShaderInput *roughness, ShaderInput *specularTint, ShaderInput *anisotropic,
ShaderInput *sheen, ShaderInput *sheenTint, ShaderInput *clearcoat, ShaderInput *clearcoatGloss,
- ShaderInput *ior, ShaderInput *transparency, ShaderInput *refr_roughness)
+ ShaderInput *ior, ShaderInput *transparency, ShaderInput *anisotropicRotation)
{
ShaderInput *base_color_in = input("BaseColor");
ShaderInput *subsurface_color_in = input("SubsurfaceColor");
@@ -2276,7 +2276,7 @@ void DisneyBsdfNode::compile(SVMCompiler& compiler, ShaderInput *metallic, Shade
int clearcoatGloss_offset = compiler.stack_assign(clearcoatGloss);
int ior_offset = compiler.stack_assign(ior);
int transparency_offset = compiler.stack_assign(transparency);
- int refr_roughness_offset = compiler.stack_assign(refr_roughness);
+ int anisotropic_rotation_offset = compiler.stack_assign(anisotropicRotation);
compiler.add_node(NODE_CLOSURE_BSDF,
compiler.encode_uchar4(closure,
@@ -2290,7 +2290,7 @@ void DisneyBsdfNode::compile(SVMCompiler& compiler, ShaderInput *metallic, Shade
compiler.encode_uchar4(specular_offset, roughness_offset, specularTint_offset, anisotropic_offset),
compiler.encode_uchar4(sheen_offset, sheenTint_offset, clearcoat_offset, clearcoatGloss_offset));
- compiler.add_node(compiler.encode_uchar4(ior_offset, transparency_offset, refr_roughness_offset, SVM_STACK_INVALID),
+ compiler.add_node(compiler.encode_uchar4(ior_offset, transparency_offset, anisotropic_rotation_offset, SVM_STACK_INVALID),
SVM_STACK_INVALID, SVM_STACK_INVALID, SVM_STACK_INVALID);
float3 bc_default = get_float3(base_color_in->socket_type);
@@ -2310,7 +2310,7 @@ void DisneyBsdfNode::compile(SVMCompiler& compiler)
{
compile(compiler, input("Metallic"), input("Subsurface"), input("Specular"), input("Roughness"),
input("SpecularTint"), input("Anisotropic"), input("Sheen"), input("SheenTint"),
- input("Clearcoat"), input("ClearcoatGloss"), input("IOR"), input("Transparency"), input("RefractionRoughness"));
+ input("Clearcoat"), input("ClearcoatGloss"), input("IOR"), input("Transparency"), input("AnisotropicRotation"));
}
void DisneyBsdfNode::compile(OSLCompiler& compiler)
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 6c2467d9bee..c916e4a5f5e 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -372,12 +372,12 @@ public:
void compile(SVMCompiler& compiler, ShaderInput *metallic, ShaderInput *subsurface,
ShaderInput *specular, ShaderInput *roughness, ShaderInput *specularTint, ShaderInput *anisotropic,
ShaderInput *sheen, ShaderInput *sheenTint, ShaderInput *clearcoat, ShaderInput *clearcoatGloss,
- ShaderInput *ior, ShaderInput *transparency, ShaderInput *refr_roughness);
+ ShaderInput *ior, ShaderInput *transparency, ShaderInput *anisotropicRotation);
float3 base_color;
float3 subsurface_color;
float metallic, subsurface, specular, roughness, specularTint, anisotropic,
- sheen, sheenTint, clearcoat, clearcoatGloss, ior, transparency, refractionRoughness;
+ sheen, sheenTint, clearcoat, clearcoatGloss, ior, transparency, anisotropicRotation;
float3 normal, clearcoatNormal, tangent;
float surface_mix_weight;
ClosureType closure;