Hello,
When rendering PBR models there are lots of problems, objects are completely smooth and certain areas being metallic that shouldn't. Additionally tangents are incorrectly generated, below is a print screen of the results. You can see the panel on the top left is discoloured and some metal pieces are as well.

The shader code is here: https://pastebin.com/fsFq8BJJ https://pastebin.com/b0c6A7MV
Tangent generation is here: https://pastebin.com/TJa2Zz4f
Tangent formula is from Eric Lengyel: https://foundationsofgameenginedev.com/FGED2-sample.pdf
If anybody can spot what's causing this issue it would be greatly appreciated, i have tried using TBN matrix and passing that from vertex shader. Also passing the calculated tangent from the CPU to GPU instead of calculating from cross product etc. Must be missing something crucial that's broke this.
Thanks.