so . . . it "kind of" works, but mainly up close from only one direction and far away it gets too distorted.. here's a vid, take a look (only the brick in the hallway[texture you supplied] is parallaxed)
Also, this is how I calculate my tangent stuff in the vertex shader:
vec3 c1 = cross( v_Normal, vec3( 0, 0, 1 ) );vec3 c2 = cross( v_Normal, vec3( 0, 1, 0 ) );vec3 tangent;if( length( c1 ) > length( c2 ) ) tangent = normalize( c1 );else tangent = normalize( c2 );vec3 n = normalize( V_NormalMatrix * v_Normal );vec3 t = normalize( V_NormalMatrix * tangent );vec3 b = cross( n, t );I see that which is probably basically what you have as your `vertex_output.tbn`At first i thought `vs_to_ts` was the same as `vertex_output.tbn`, but apparently not... So i tried this instead:mat3 vs_to_ts = mat3(t.x,b.x,n.x,t.y,b.y,n.y,t.z,b.z,n.z );and these are the results I got. No distortion. . . but still seems somewhat wrong? It like... goes from one direction to the other, based on the direction i'm viewing it from..It almost seems like my tangent calculations are wrong? But, I use them in my specular normalmapping which works perfectly fine, so I don't think they're off..
hey there, I only had time to look at this now, here's how I calculate the tangents (on the cpu):