Generate Procedural Mesh

What are you using as the inputs to ddx and ddy? Since I’m looking at fixing the lighting on my meshes anyways, I was noticing that flipping the green channel on my normal maps gives me the correct lighting on my generated meshes. I’m using thisalgorithm, to calculate my tangents.