Page MenuHome

Missing normal map output with CPU rendering, OSL, and shade smooth (Recent regression)
Closed, ResolvedPublicBUG

Description

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 resultResult when rendering with OSL and Shade smooth

Exact steps for others to reproduce the error:

  1. Start a scene and set the render engine to Cycles
  2. Give an object a normal map node with an input going into it (I used the Color output of the Voronoi Texture).
  3. 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)
  4. Render the scene or change to rendered viewport mode and notice that the normal map is working.
  5. 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:

Event Timeline

Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Aug 21 2021, 12:41 PM
Pratik Borhade (PratikPB2123) triaged this task as High priority.Aug 21 2021, 12:44 PM
Alaska (Alaska) changed the subtype of this task from "Report" to "Bug".Aug 23 2021, 2:16 AM
Alaska (Alaska) renamed this task from Missing normal map output with CPU rendering (Recent regression) to Missing normal map output with CPU rendering, OSL, and shade smooth (Recent regression).Aug 23 2021, 4:02 AM