Cycles: Anisotropic BSDF enabled, with tangents now computed from the active UV map.
It's using the Ward BSDF currently, which has some energy loss so might be a bit dark. More/better BSDF options can be implemented later. Patch by Mike Farnsworth, some modifications by me. Currently it's not possible yet to set a custom tangent, that will follow as part of per-bsdf normals patch.
This commit is contained in:
@@ -33,6 +33,28 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Find/Add */
|
||||
|
||||
static float3 tri_calc_tangent(float3 v0, float3 v1, float3 v2, float3 tx0, float3 tx1, float3 tx2)
|
||||
{
|
||||
float3 duv1 = tx2 - tx0;
|
||||
float3 duv2 = tx2 - tx1;
|
||||
float3 dp1 = v2 - v0;
|
||||
float3 dp2 = v2 - v1;
|
||||
float det = duv1[0] * duv2[1] - duv1[1] * duv2[0];
|
||||
|
||||
if(det != 0.0f) {
|
||||
return normalize(dp1 * duv2[1] - dp2 * duv1[1]);
|
||||
}
|
||||
else {
|
||||
/* give back a sane default, using a valid edge as a fallback */
|
||||
float3 edge = v1 - v0;
|
||||
|
||||
if(len(edge) == 0.0f)
|
||||
edge = v2 - v0;
|
||||
|
||||
return normalize(edge);
|
||||
}
|
||||
}
|
||||
|
||||
static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<uint>& used_shaders)
|
||||
{
|
||||
/* create vertices */
|
||||
@@ -157,6 +179,67 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* create texcoord-based tangent attributes */
|
||||
{
|
||||
BL::Mesh::tessface_uv_textures_iterator l;
|
||||
|
||||
for(b_mesh.tessface_uv_textures.begin(l); l != b_mesh.tessface_uv_textures.end(); ++l) {
|
||||
AttributeStandard std = (l->active_render())? ATTR_STD_TANGENT: ATTR_STD_NONE;
|
||||
|
||||
if(!mesh->need_attribute(scene, std))
|
||||
continue;
|
||||
|
||||
Attribute *attr = mesh->attributes.add(std, ustring("Tangent"));
|
||||
|
||||
/* compute average tangents per vertex */
|
||||
float3 *tangents = attr->data_float3();
|
||||
memset(tangents, 0, sizeof(float3)*mesh->verts.size());
|
||||
|
||||
BL::MeshTextureFaceLayer::data_iterator t;
|
||||
|
||||
size_t fi = 0; /* face index */
|
||||
b_mesh.tessfaces.begin(f);
|
||||
for(l->data.begin(t); t != l->data.end() && f != b_mesh.tessfaces.end(); ++t, ++fi, ++f) {
|
||||
int4 vi = get_int4(f->vertices_raw());
|
||||
|
||||
float3 tx0 = get_float3(t->uv1());
|
||||
float3 tx1 = get_float3(t->uv2());
|
||||
float3 tx2 = get_float3(t->uv3());
|
||||
|
||||
float3 v0 = mesh->verts[vi[0]];
|
||||
float3 v1 = mesh->verts[vi[1]];
|
||||
float3 v2 = mesh->verts[vi[2]];
|
||||
|
||||
/* calculate tangent for the triangle;
|
||||
* get vertex positions, and find change in position with respect
|
||||
* to the texture coords in the first texture coord dimension */
|
||||
float3 tangent0 = tri_calc_tangent(v0, v1, v2, tx0, tx1, tx2);
|
||||
|
||||
if(nverts[fi] == 4) {
|
||||
/* quad tangent */
|
||||
float3 tx3 = get_float3(t->uv4());
|
||||
float3 v3 = mesh->verts[vi[3]];
|
||||
float3 tangent1 = tri_calc_tangent(v0, v2, v3, tx0, tx2, tx3);
|
||||
|
||||
tangents[vi[0]] += 0.5f*(tangent0 + tangent1);
|
||||
tangents[vi[1]] += tangent0;
|
||||
tangents[vi[2]] += 0.5f*(tangent0 + tangent1);
|
||||
tangents[vi[3]] += tangent1;
|
||||
}
|
||||
else {
|
||||
/* triangle tangent */
|
||||
tangents[vi[0]] += tangent0;
|
||||
tangents[vi[1]] += tangent0;
|
||||
tangents[vi[2]] += tangent0;
|
||||
}
|
||||
}
|
||||
|
||||
/* normalize tangent vectors */
|
||||
for(int i = 0; i < mesh->verts.size(); i++)
|
||||
tangents[i] = normalize(tangents[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void create_subd_mesh(Mesh *mesh, BL::Mesh b_mesh, PointerRNA *cmesh, const vector<uint>& used_shaders)
|
||||
|
@@ -315,6 +315,10 @@ static ShaderNode *add_node(BL::BlendData b_data, BL::Scene b_scene, ShaderGraph
|
||||
node = new HoldoutNode();
|
||||
break;
|
||||
}
|
||||
case BL::ShaderNode::type_BSDF_ANISOTROPIC: {
|
||||
node = new WardBsdfNode();
|
||||
break;
|
||||
}
|
||||
case BL::ShaderNode::type_BSDF_DIFFUSE: {
|
||||
node = new DiffuseBsdfNode();
|
||||
break;
|
||||
|
@@ -72,7 +72,7 @@ __device void to_unit_disk(float *x, float *y)
|
||||
|
||||
__device void make_orthonormals_tangent(const float3 N, const float3 T, float3 *a, float3 *b)
|
||||
{
|
||||
*b = cross(N, T);
|
||||
*b = normalize(cross(N, T));
|
||||
*a = cross(*b, N);
|
||||
}
|
||||
|
||||
|
@@ -93,6 +93,7 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
|
||||
#ifdef __DPDU__
|
||||
/* dPdu/dPdv */
|
||||
triangle_dPdudv(kg, &sd->dPdu, &sd->dPdv, sd->prim);
|
||||
sd->T = make_float3(0.0f, 0.0f, 0.0f);
|
||||
#endif
|
||||
|
||||
#ifdef __INSTANCING__
|
||||
@@ -117,6 +118,7 @@ __device_inline void shader_setup_from_ray(KernelGlobals *kg, ShaderData *sd,
|
||||
#ifdef __DPDU__
|
||||
sd->dPdu = -sd->dPdu;
|
||||
sd->dPdv = -sd->dPdv;
|
||||
sd->T = make_float3(0.0f, 0.0f, 0.0f);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -208,6 +210,8 @@ __device void shader_setup_from_sample(KernelGlobals *kg, ShaderData *sd,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
sd->T = make_float3(0.0f, 0.0f, 0.0f);
|
||||
#endif
|
||||
|
||||
/* backfacing test */
|
||||
@@ -293,6 +297,7 @@ __device_inline void shader_setup_from_background(KernelGlobals *kg, ShaderData
|
||||
/* dPdu/dPdv */
|
||||
sd->dPdu = make_float3(0.0f, 0.0f, 0.0f);
|
||||
sd->dPdv = make_float3(0.0f, 0.0f, 0.0f);
|
||||
sd->T = make_float3(0.0f, 0.0f, 0.0f);
|
||||
#endif
|
||||
|
||||
#ifdef __RAY_DIFFERENTIALS__
|
||||
|
@@ -447,6 +447,9 @@ typedef struct ShaderData {
|
||||
/* differential of P w.r.t. parametric coordinates. note that dPdu is
|
||||
* not readily suitable as a tangent for shading on triangles. */
|
||||
float3 dPdu, dPdv;
|
||||
|
||||
/* tangent for shading */
|
||||
float3 T;
|
||||
#endif
|
||||
|
||||
#ifdef __MULTI_CLOSURE__
|
||||
|
@@ -67,7 +67,7 @@ __device float3 bsdf_ward_eval_reflect(const ShaderData *sd, const ShaderClosure
|
||||
float m_ax = sc->data0;
|
||||
float m_ay = sc->data1;
|
||||
float3 m_N = sd->N;
|
||||
float3 m_T = normalize(sd->dPdu);
|
||||
float3 m_T = sd->T;
|
||||
|
||||
float cosNO = dot(m_N, I);
|
||||
float cosNI = dot(m_N, omega_in);
|
||||
@@ -90,6 +90,7 @@ __device float3 bsdf_ward_eval_reflect(const ShaderData *sd, const ShaderClosure
|
||||
*pdf = exp_val / denom;
|
||||
return make_float3 (out, out, out);
|
||||
}
|
||||
|
||||
return make_float3 (0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ __device int bsdf_ward_sample(const ShaderData *sd, const ShaderClosure *sc, flo
|
||||
float m_ax = sc->data0;
|
||||
float m_ay = sc->data1;
|
||||
float3 m_N = sd->N;
|
||||
float3 m_T = normalize(sd->dPdu);
|
||||
float3 m_T = sd->T;
|
||||
|
||||
float cosNO = dot(m_N, sd->I);
|
||||
if(cosNO > 0) {
|
||||
|
@@ -205,6 +205,14 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
|
||||
case NODE_CLOSURE_WEIGHT:
|
||||
svm_node_closure_weight(sd, stack, node.y);
|
||||
break;
|
||||
#ifdef __DPDU__
|
||||
case NODE_CLOSURE_SET_TANGENT:
|
||||
svm_node_closure_set_tangent(sd, node.y, node.z, node.w);
|
||||
break;
|
||||
case NODE_CLOSURE_TANGENT:
|
||||
svm_node_closure_tangent(sd, stack, node.y);
|
||||
break;
|
||||
#endif
|
||||
case NODE_EMISSION_WEIGHT:
|
||||
svm_node_emission_weight(kg, sd, stack, node);
|
||||
break;
|
||||
@@ -261,14 +269,14 @@ __device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ShaderT
|
||||
svm_node_camera(kg, sd, stack, node.y, node.z, node.w);
|
||||
break;
|
||||
case NODE_GEOMETRY:
|
||||
svm_node_geometry(sd, stack, node.y, node.z);
|
||||
svm_node_geometry(kg, sd, stack, node.y, node.z);
|
||||
break;
|
||||
#ifdef __EXTRA_NODES__
|
||||
case NODE_GEOMETRY_BUMP_DX:
|
||||
svm_node_geometry_bump_dx(sd, stack, node.y, node.z);
|
||||
svm_node_geometry_bump_dx(kg, sd, stack, node.y, node.z);
|
||||
break;
|
||||
case NODE_GEOMETRY_BUMP_DY:
|
||||
svm_node_geometry_bump_dy(sd, stack, node.y, node.z);
|
||||
svm_node_geometry_bump_dy(kg, sd, stack, node.y, node.z);
|
||||
break;
|
||||
case NODE_LIGHT_PATH:
|
||||
svm_node_light_path(sd, stack, node.y, node.z, path_flag);
|
||||
|
@@ -179,7 +179,7 @@ __device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *st
|
||||
float roughness_u = param1;
|
||||
float roughness_v = param2;
|
||||
|
||||
bsdf_ward_setup(sd, sc, normalize(sd->dPdu), roughness_u, roughness_v);
|
||||
bsdf_ward_setup(sd, sc, normalize(sd->T), roughness_u, roughness_v);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@@ -425,5 +425,24 @@ __device void svm_node_add_closure(ShaderData *sd, float *stack, uint unused,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __DPDU__
|
||||
__device_inline void svm_node_closure_store_tangent(ShaderData *sd, float3 tangent)
|
||||
{
|
||||
sd->T = normalize(tangent);
|
||||
}
|
||||
|
||||
__device void svm_node_closure_set_tangent(ShaderData *sd, uint x, uint y, uint z)
|
||||
{
|
||||
float3 tangent = make_float3(__int_as_float(x), __int_as_float(y), __int_as_float(z));
|
||||
svm_node_closure_store_tangent(sd, tangent);
|
||||
}
|
||||
|
||||
__device void svm_node_closure_tangent(ShaderData *sd, float *stack, uint tangent_offset)
|
||||
{
|
||||
float3 tangent = stack_load_float3(stack, tangent_offset);
|
||||
svm_node_closure_store_tangent(sd, tangent);
|
||||
}
|
||||
#endif
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
|
@@ -20,7 +20,7 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Geometry Node */
|
||||
|
||||
__device void svm_node_geometry(ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
__device void svm_node_geometry(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
{
|
||||
float3 data;
|
||||
|
||||
@@ -28,7 +28,16 @@ __device void svm_node_geometry(ShaderData *sd, float *stack, uint type, uint ou
|
||||
case NODE_GEOM_P: data = sd->P; break;
|
||||
case NODE_GEOM_N: data = sd->N; break;
|
||||
#ifdef __DPDU__
|
||||
case NODE_GEOM_T: data = normalize(sd->dPdu); break;
|
||||
case NODE_GEOM_T: {
|
||||
int attr_offset = find_attribute(kg, sd, ATTR_STD_TANGENT);
|
||||
|
||||
if(attr_offset == ATTR_STD_NOT_FOUND)
|
||||
data = normalize(sd->dPdu);
|
||||
else
|
||||
data = triangle_attribute_float3(kg, sd, ATTR_ELEMENT_VERTEX, attr_offset, NULL, NULL);
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case NODE_GEOM_I: data = sd->I; break;
|
||||
case NODE_GEOM_Ng: data = sd->Ng; break;
|
||||
@@ -40,7 +49,7 @@ __device void svm_node_geometry(ShaderData *sd, float *stack, uint type, uint ou
|
||||
stack_store_float3(stack, out_offset, data);
|
||||
}
|
||||
|
||||
__device void svm_node_geometry_bump_dx(ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
__device void svm_node_geometry_bump_dx(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
{
|
||||
#ifdef __RAY_DIFFERENTIALS__
|
||||
float3 data;
|
||||
@@ -48,16 +57,16 @@ __device void svm_node_geometry_bump_dx(ShaderData *sd, float *stack, uint type,
|
||||
switch(type) {
|
||||
case NODE_GEOM_P: data = sd->P + sd->dP.dx; break;
|
||||
case NODE_GEOM_uv: data = make_float3(sd->u + sd->du.dx, sd->v + sd->dv.dx, 0.0f); break;
|
||||
default: svm_node_geometry(sd, stack, type, out_offset); return;
|
||||
default: svm_node_geometry(kg, sd, stack, type, out_offset); return;
|
||||
}
|
||||
|
||||
stack_store_float3(stack, out_offset, data);
|
||||
#else
|
||||
svm_node_geometry(sd, stack, type, out_offset);
|
||||
svm_node_geometry(kg, sd, stack, type, out_offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
__device void svm_node_geometry_bump_dy(ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
__device void svm_node_geometry_bump_dy(KernelGlobals *kg, ShaderData *sd, float *stack, uint type, uint out_offset)
|
||||
{
|
||||
#ifdef __RAY_DIFFERENTIALS__
|
||||
float3 data;
|
||||
@@ -65,12 +74,12 @@ __device void svm_node_geometry_bump_dy(ShaderData *sd, float *stack, uint type,
|
||||
switch(type) {
|
||||
case NODE_GEOM_P: data = sd->P + sd->dP.dy; break;
|
||||
case NODE_GEOM_uv: data = make_float3(sd->u + sd->du.dy, sd->v + sd->dv.dy, 0.0f); break;
|
||||
default: svm_node_geometry(sd, stack, type, out_offset); return;
|
||||
default: svm_node_geometry(kg, sd, stack, type, out_offset); return;
|
||||
}
|
||||
|
||||
stack_store_float3(stack, out_offset, data);
|
||||
#else
|
||||
svm_node_geometry(sd, stack, type, out_offset);
|
||||
svm_node_geometry(kg, sd, stack, type, out_offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -92,7 +92,9 @@ typedef enum NodeType {
|
||||
NODE_LIGHT_FALLOFF,
|
||||
NODE_OBJECT_INFO,
|
||||
NODE_PARTICLE_INFO,
|
||||
NODE_TEX_BRICK
|
||||
NODE_TEX_BRICK,
|
||||
NODE_CLOSURE_SET_TANGENT,
|
||||
NODE_CLOSURE_TANGENT,
|
||||
} NodeType;
|
||||
|
||||
typedef enum NodeAttributeType {
|
||||
|
@@ -162,6 +162,8 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
|
||||
attr = add(name, TypeDesc::TypeNormal, Attribute::FACE);
|
||||
else if(std == ATTR_STD_UV)
|
||||
attr = add(name, TypeDesc::TypePoint, Attribute::CORNER);
|
||||
else if(std == ATTR_STD_TANGENT)
|
||||
attr = add(name, TypeDesc::TypeVector, Attribute::VERTEX);
|
||||
else if(std == ATTR_STD_GENERATED)
|
||||
attr = add(name, TypeDesc::TypePoint, Attribute::VERTEX);
|
||||
else if(std == ATTR_STD_POSITION_UNDEFORMED)
|
||||
|
@@ -468,6 +468,12 @@ void ShaderGraph::default_inputs(bool do_osl)
|
||||
|
||||
connect(geom->output("Position"), input);
|
||||
}
|
||||
else if(input->default_value == ShaderInput::TANGENT) {
|
||||
if(!geom)
|
||||
geom = new GeometryNode();
|
||||
|
||||
connect(geom->output("Tangent"), input);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -112,6 +112,7 @@ public:
|
||||
INCOMING,
|
||||
NORMAL,
|
||||
POSITION,
|
||||
TANGENT,
|
||||
NONE
|
||||
};
|
||||
|
||||
|
@@ -1221,12 +1221,35 @@ WardBsdfNode::WardBsdfNode()
|
||||
{
|
||||
closure = CLOSURE_BSDF_WARD_ID;
|
||||
|
||||
add_input("Tangent", SHADER_SOCKET_VECTOR, ShaderInput::TANGENT);
|
||||
|
||||
add_input("Roughness U", SHADER_SOCKET_FLOAT, 0.2f);
|
||||
add_input("Roughness V", SHADER_SOCKET_FLOAT, 0.2f);
|
||||
}
|
||||
|
||||
void WardBsdfNode::attributes(AttributeRequestSet *attributes)
|
||||
{
|
||||
ShaderInput *tangent_in = input("Tangent");
|
||||
|
||||
if(!tangent_in->link)
|
||||
attributes->add(ATTR_STD_TANGENT);
|
||||
|
||||
ShaderNode::attributes(attributes);
|
||||
}
|
||||
|
||||
void WardBsdfNode::compile(SVMCompiler& compiler)
|
||||
{
|
||||
ShaderInput *tangent_in = input("Tangent");
|
||||
|
||||
if(tangent_in->link) {
|
||||
int attr = compiler.attribute(ATTR_STD_TANGENT);
|
||||
compiler.stack_assign(tangent_in);
|
||||
compiler.add_node(NODE_ATTR, attr, tangent_in->stack_offset, NODE_ATTR_FLOAT3);
|
||||
compiler.add_node(NODE_CLOSURE_TANGENT, tangent_in->stack_offset);
|
||||
}
|
||||
else
|
||||
compiler.add_node(NODE_CLOSURE_SET_TANGENT, tangent_in->value);
|
||||
|
||||
BsdfNode::compile(compiler, input("Roughness U"), input("Roughness V"));
|
||||
}
|
||||
|
||||
@@ -1566,6 +1589,14 @@ GeometryNode::GeometryNode()
|
||||
add_output("Backfacing", SHADER_SOCKET_FLOAT);
|
||||
}
|
||||
|
||||
void GeometryNode::attributes(AttributeRequestSet *attributes)
|
||||
{
|
||||
if(!output("Tangent")->links.empty())
|
||||
attributes->add(ATTR_STD_TANGENT);
|
||||
|
||||
ShaderNode::attributes(attributes);
|
||||
}
|
||||
|
||||
void GeometryNode::compile(SVMCompiler& compiler)
|
||||
{
|
||||
ShaderOutput *out;
|
||||
|
@@ -201,6 +201,7 @@ public:
|
||||
class WardBsdfNode : public BsdfNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(WardBsdfNode)
|
||||
void attributes(AttributeRequestSet *attributes);
|
||||
};
|
||||
|
||||
class DiffuseBsdfNode : public BsdfNode {
|
||||
@@ -278,6 +279,7 @@ public:
|
||||
class GeometryNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(GeometryNode)
|
||||
void attributes(AttributeRequestSet *attributes);
|
||||
};
|
||||
|
||||
class TextureCoordinateNode : public ShaderNode {
|
||||
|
@@ -449,6 +449,7 @@ typedef enum AttributeStandard {
|
||||
ATTR_STD_VERTEX_NORMAL,
|
||||
ATTR_STD_FACE_NORMAL,
|
||||
ATTR_STD_UV,
|
||||
ATTR_STD_TANGENT,
|
||||
ATTR_STD_GENERATED,
|
||||
ATTR_STD_POSITION_UNDEFORMED,
|
||||
ATTR_STD_POSITION_UNDISPLACED,
|
||||
|
@@ -2248,6 +2248,7 @@ static void registerShaderNodes(bNodeTreeType *ttype)
|
||||
register_node_type_sh_particle_info(ttype);
|
||||
|
||||
register_node_type_sh_background(ttype);
|
||||
register_node_type_sh_bsdf_anisotropic(ttype);
|
||||
register_node_type_sh_bsdf_diffuse(ttype);
|
||||
register_node_type_sh_bsdf_glossy(ttype);
|
||||
register_node_type_sh_bsdf_glass(ttype);
|
||||
|
@@ -67,6 +67,7 @@ DefNode( ShaderNode, SH_NODE_ADD_SHADER, 0, "AD
|
||||
DefNode( ShaderNode, SH_NODE_ATTRIBUTE, def_sh_attribute, "ATTRIBUTE", Attribute, "Attribute", "" )
|
||||
DefNode( ShaderNode, SH_NODE_BACKGROUND, 0, "BACKGROUND", Background, "Background", "" )
|
||||
DefNode( ShaderNode, SH_NODE_HOLDOUT, 0, "HOLDOUT", Holdout, "Holdout", "" )
|
||||
DefNode( ShaderNode, SH_NODE_BSDF_ANISOTROPIC, 0, "BSDF_ANISOTROPIC", BsdfAnisotropic, "Anisotropic Bsdf", "" )
|
||||
DefNode( ShaderNode, SH_NODE_BSDF_DIFFUSE, 0, "BSDF_DIFFUSE", BsdfDiffuse, "Diffuse Bsdf", "" )
|
||||
DefNode( ShaderNode, SH_NODE_BSDF_GLOSSY, def_glossy, "BSDF_GLOSSY", BsdfGlossy, "Glossy Bsdf", "" )
|
||||
DefNode( ShaderNode, SH_NODE_BSDF_GLASS, def_glossy, "BSDF_GLASS", BsdfGlass, "Glass Bsdf", "" )
|
||||
|
@@ -146,7 +146,7 @@ set(SRC
|
||||
shader/nodes/node_shader_vectMath.c
|
||||
shader/nodes/node_shader_attribute.c
|
||||
shader/nodes/node_shader_background.c
|
||||
# shader/nodes/node_shader_bsdf_anisotropic.c # XXX, why not included?
|
||||
shader/nodes/node_shader_bsdf_anisotropic.c
|
||||
shader/nodes/node_shader_bsdf_diffuse.c
|
||||
shader/nodes/node_shader_bsdf_glossy.c
|
||||
shader/nodes/node_shader_bsdf_glass.c
|
||||
|
@@ -88,6 +88,7 @@ void register_node_type_sh_bsdf_glass(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_bsdf_translucent(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_bsdf_transparent(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_bsdf_velvet(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_bsdf_anisotropic(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_emission(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_holdout(struct bNodeTreeType *ttype);
|
||||
void register_node_type_sh_volume_transparent(struct bNodeTreeType *ttype);
|
||||
|
@@ -51,7 +51,7 @@ void register_node_type_sh_bsdf_anisotropic(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype;
|
||||
|
||||
node_type_base(ttype, &ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_SHADER, 0);
|
||||
node_type_base(ttype, &ntype, SH_NODE_BSDF_ANISOTROPIC, "Anisotropic BSDF", NODE_CLASS_SHADER, 0);
|
||||
node_type_compatibility(&ntype, NODE_NEW_SHADING);
|
||||
node_type_socket_templates(&ntype, sh_node_bsdf_anisotropic_in, sh_node_bsdf_anisotropic_out);
|
||||
node_type_size(&ntype, 150, 60, 200);
|
||||
|
Reference in New Issue
Block a user