Using the Edge Angle node, which allows us to determine the angle on a common edge of two neighboring polygons, we can easily create an analogue of the “shade autosmooth” function – automatically turning on a smooth shading depending on the polygons angle.
Add Suzanne to the scene (shift + a – Mesh – Monkey), assign it the Geometry Nodes modifier and create an initial tree of nodes by clicking on the “New” button.
To append smooth shading to the mesh, let’s add the Set Shade Smooth node to the main geometry node tree branch (shift + a – Mesh – Write – Set Shade Smooth).
Smooth shading will be enabled for the entire mesh at once.
To control it depending on the angles of the polygons, add the Edge Angle node (shift + a – Mesh – Read – Edge Angle).
To compare the value of the angle between polygons with a number, add the Compare node (shift + a – Utilities – Math – Compare) and link it’s A input with the “Unsigned Angle” output of the Edge Angle node. Link the “Result” output with the “Shade Smooth” input of the Set Shade Smooth node.
By scrolling the value in field “B” of the Compare node, we can see how smooth shading is turned on and off for individual polygons depending on the current value.
The Edge Angle node outputs a value in radians, so we also use radians in the “B” field of the node. To operate with degrees, let’s add the Math node (shift + a – Utilities – Math). Switch it to the “To Radians” mode. Link its “Value” output with the “B” input of the Compare node.
Now, to control the smoothness of the shading, we can change the angle value in the “Degrees” field of the To Radians (Math) node, operating with angles in degrees.
Bonus info by Vyacheslav Kobozev:
In Blender 3.6, the Shage Autosmooth node only works for polygons, so in the case where one polygon has several different angles that fall into and not the condition, shading could not be correct.
To improve the result, we can add a Split Edges node (shift + a – Mesh – Operators – Split Edges) and transfer all calculations to it. Add this node before the Shade Autosmooth node, and move the link from the “Shade Smooth” input of this node to the “Selection” input of the added Split Edges node.
In Blender 4.0 we can simply switch the Shade Autosmooth node to the “Edges” domain.
This way the shading result will be more correct.