How to clip a Background Sky Texture to only above the horizon?

Hello everyone,

I am currently looking for a way to clip a Sky Texture as Background so that it is only above the horizon and anything below is black.

This is the usual:


This is what I want:


So I first tried playing with the Z value of the Clipping of the Mapping Node but the result does not make everything else black.
Then I tried mixing the texture with an rgb node and using a mapping node as Fac but it did not work out.


So please show me a node setup that could do this.

Thanks in advance!

Split out the generated.Z channel with the Seperate XYZ node, then use a math node set to “greater than” with the second value set to “0”, this will mark the values that are positive. Generated.Z for the world background is only positive above the horizon. Then simply use that as a mix factor with a solid black color:


Thank you! I made a node group for this but it utilizes a color ramp, this way you can control the clipping border and the easing. https://blenderartists.org/forum/showthread.php?449053-Node-Group-Texture-Axis-Clipping-WIP&highlight=