tangent to camera node

I’m trying to mimic material with normal map and normal mapped reflection texture, with only textures (no material in node tree). It works pretty much like I expected, but I’ve got problem - I can’t figure out what vector math is used to transform tangent space normals from texture to camera space normals of object (combined with “face” normals).
Can someone help me?

here is file
http://www.pasteall.org/blend/19637
right one - sphere textured like every one would do
left one - sphere textured with my wicked and broken method :slight_smile:

Thanks

I don’t think you can do this, because in order to use tangent-space normal map you need to reconstruct tangent-space normal from surface normal and two tangent vectors. The latter, as I see, are not present in any inputs, so…

You can see the math here: http://www.terathon.com/code/tangent.html

Too bad, thanks for answer and link!