Updated to store tbnMat as a publicly accessible variable in the PBRSurface.glsl struct, that way tbnMat won't need recalculated anywhere else in the shader it is needed.
@@ -10,6 +10,7 @@
vec3 normal; // normals w/ normalmap
bool frontFacing; //gl_FrontFacing
float depth;
+ mat3 tbnMat;
// from texture
vec3 albedo;
@@ -36,4 +37,4 @@
#endstruct
#define PBRSurface StdPBRSurface
#endif
-#endif
+#endif