Problem with Normal Map in PBR Shader

Hello, im 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.

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 right shader group “demonic pbr shader 0.4”. if you open either the non-metallic or metallic group you see a “coating” group. this group calculates the glossiness of the material and the coat and merges the values. I am not hundred percent sure but i believe this group causes the problem. but i cant find a solution. thx for your help! :slight_smile:

Here you can download the blend file: