System Information:
Operating system: Linux-5.10.0-8-amd64-x86_64-with-glibc2.31 64 Bits
Graphics card: NA
Blender Version:
Broken: 3.0.0 Alpha, branch: master, commit date: 2021-08-20 13:00, hash: rB1b5f17b86771
Worked: Prior to rBb8ecdbcd964a: Cycles: avoid copying vertex normals attribute twice to the devices
Bisecting the issue shows that rBb8ecdbcd964a: Cycles: avoid copying vertex normals attribute twice to the devices is the cause.
Short description of error:
The normal map node will produce incorrect results on the CPU when Open Shading Language (OSL) and Shade Smooth is enabled. Here are some images:
| Expected result | Result when rendering with OSL and Shade smooth |
Exact steps for others to reproduce the error:
- Start a scene and set the render engine to Cycles
- Give an object a normal map node with an input going into it (I used the Color output of the Voronoi Texture).
- Connect the normal map node output to some part of the shader that makes it visible when rendering (I connected the output directly to the Material output)
- Render the scene or change to rendered viewport mode and notice that the normal map is working.
- Enable Open Shading Language in the Render Properties tab and enable Smooth Shading on the object (Top of viewport -> Object -> Shade Smooth) and re-render, noticing that the normal map is now incorrect.
Here is a file for you to test with:

