diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-11-11 18:42:49 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-11-11 19:10:30 +0300 |
commit | 097a13f5be143bd37bfd635cbf31515d531d7a8a (patch) | |
tree | d45481a1c80eb0d1251fad51d07813242d5cf21b /intern/cycles/scene/shader_nodes.cpp | |
parent | dc8a1d38b73420428f9fb878386b99ebb69dd841 (diff) |
Fix broken Cycles rendering with recent OSL versions
Commit c8dd33f5a37b6a6db0b6950d24f9a7cff5ceb799 in OSL
changed behavior of shader parameters that reference each other
and are also overwritten with an instance value.
This is causing the "NormalIn" parameter of a few OSL nodes in
Cycles to be set to zero somehow, which should instead have
received the value from a "node_geometry" node Cycles generates
and connects automatically. I am not entirely sure why that is
happening, but these parameters are superfluous anyway, since
OSL already provides the necessary data in the global variable "N".
So this patch simply removes those parameters (which mimics
SVM, where these parameters do not exist either), which also
fixes the rendering artifacts that occured with recent OSL.
Maniphest Tasks: T101222
Differential Revision: https://developer.blender.org/D16470
Diffstat (limited to 'intern/cycles/scene/shader_nodes.cpp')
-rw-r--r-- | intern/cycles/scene/shader_nodes.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/intern/cycles/scene/shader_nodes.cpp b/intern/cycles/scene/shader_nodes.cpp index a9cd453947b..2c1cd3ee737 100644 --- a/intern/cycles/scene/shader_nodes.cpp +++ b/intern/cycles/scene/shader_nodes.cpp @@ -3677,9 +3677,6 @@ NODE_DEFINE(GeometryNode) { NodeType *type = NodeType::add("geometry", create, NodeType::SHADER); - SOCKET_IN_NORMAL( - normal_osl, "NormalIn", zero_float3(), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL); - SOCKET_OUT_POINT(position, "Position"); SOCKET_OUT_NORMAL(normal, "Normal"); SOCKET_OUT_NORMAL(tangent, "Tangent"); @@ -3812,9 +3809,6 @@ NODE_DEFINE(TextureCoordinateNode) SOCKET_BOOLEAN(use_transform, "Use Transform", false); SOCKET_TRANSFORM(ob_tfm, "Object Transform", transform_identity()); - SOCKET_IN_NORMAL( - normal_osl, "NormalIn", zero_float3(), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL); - SOCKET_OUT_POINT(generated, "Generated"); SOCKET_OUT_NORMAL(normal, "Normal"); SOCKET_OUT_POINT(UV, "UV"); @@ -7305,8 +7299,6 @@ NODE_DEFINE(NormalMapNode) SOCKET_STRING(attribute, "Attribute", ustring()); - SOCKET_IN_NORMAL( - normal_osl, "NormalIn", zero_float3(), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL); SOCKET_IN_FLOAT(strength, "Strength", 1.0f); SOCKET_IN_COLOR(color, "Color", make_float3(0.5f, 0.5f, 1.0f)); @@ -7400,8 +7392,6 @@ NODE_DEFINE(TangentNode) SOCKET_STRING(attribute, "Attribute", ustring()); - SOCKET_IN_NORMAL( - normal_osl, "NormalIn", zero_float3(), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL); SOCKET_OUT_NORMAL(tangent, "Tangent"); return type; |