Possibly found a simpler way without a custom function.
Use the Rotate About Axis NodeRotate About Axis Node
and just set the AxisAxis
you want to rotate around (vertical is Y) to 1 and others to 0.
Connect the ViewDirectionViewDirection
Node to the InIn
and the OutOut
to the SampleCubeMap ViewDirSampleCubeMap ViewDir
.