ratchetfreak
find the component with the highest absolute value and then project the coordinate onto the plane in that direction
aka if it's the x component and it is negative then the coordinates on the -x plane is (-y/x, -z/x)
(do double check how the order of coordinates works out)
ratchetfreak
you can check the textures end up in the right place/orientation using a debug texture with colored lines crossing boundaries