Problem with Fresnel Artifacts in PBR Shader I'm creating a PBR all-in-one Shader. it is suposed to function as a streamlined connection between substance/marmorset and blender, where u only have to connect the textures into the material inputs and get a PBR metallic/non metallic fresnel shader.

the core structure of the shader is ready and works mostly fine. But the normal maps are not completely working well (maybe there is sth wrong with the normal orientation. maybe somewhere the normal inputs do not get handled as a normal map anymore. but i cant find where). also if you do not have a normal map assigned and you dont put the "normal power" (intensity) to zero, you get strange artifacts. (solved)

(solved)

Also there are strange lines on the mesh surface that should be really not there. i think it has to do something with the fresnel effect.



I dont know what i did wrong but maybe you can help me. Here i created a little introduction into the main functions of the shader.


The problem should lay in the left shader group "demonic inputs". I am not hundred percent sure but i believe this group causes the problem. but i cant find a solution. thx for your help! :)

Here you can download the blend file: Download Blend File
For the glitchy normals when not using a bump/normal map: When you have a loose shader node with no connection to the normal inputs, Cycles defaults to the mesh normal to avoid shading artifacts. However, when the shader normal is connected to a group input, this doesn't happen. So the shader evaluation normal instead gets initialized to whatever the group input socket default was. You can fix this by connecting the Geometry node's "normal" output to where your normal map would go (if you had one). This just explicitly tells Cycles to use the mesh normal.