Adding normal map to material with world aligned texture

I’m trying to create world-aligned material from scratch. I have texture and height map. Currently I’ve done this:

So, my normal map works well on top and bottom surfaces only (because I use WorldPosition-XY to align it). How can I modify this to make it work on every surface?

Also, which alternatives to world-aligning do I have to align textures seamlessly on different-sized adjacent boxes?