Normal mapping without tangent/binormal

Ah cool!, this is quite similar to what I’m using in the RenderPipeline:
https://github.com/tobspr/RenderPipeline/blob/refactoring_beta/Shader/Includes/NormalMapping.inc.glsl

You should include a check for invalid gradients tho, maybe. This happens when two adjacent vertices have the same texture coordinate, the gradient will be 0 then and you will get a bunch of NaN’s. See Line 11 of my implementation.

1 Like