How to get the forward vector in a material?

I ended up importing all the meshes I needed it for rotated in a way so that the forward vector becomes the up vector. It is a silly workaround but as long as you only need the forward vector it works that way.