So i have a vector, a surface normal, pointing away from the surface. i also have a vector, sampled from a normal map, indicating the normal vector of that fragment.

now i want the normal map vectors y axis to go along the surface normal.

for example: i have up-pointing normal map vector vec3(0.0, 0.8, 0.3) and my surface normal vec3(0, 0, 1). now i want to "rotate" my mapped vector, so it would result in vec3(0.0, 0.3, 0.8).

how would i have to calculate it, that it works with any two vectors???