So I'm trying to implement tangent space normal mapping. I bind the uniforms, load the attributes, set the shaders, and out comes this:
This happens on the sides only, and not when in direct light. I'm pretty sure it's matrix related, but could it be I'm mapping the tangent values incorrectly? Has anyone seen something like this before? Or have a hunch what it could be?
UV screenshot, it's a cube, turned into a sphere, and each side is separated. The final object shows no seams on the top or bottom, but rather on each side.
Update: When I order the tangents according to UVs, I get a much cleaner result, but some areas/sides still get an inverted normal. I'm not sure why this is, or how to fix it. It happens on each side, so it is as if the sides get inverted normals.