Source engine style skybox for space shooter using a postprocess

I was trying to figure out how to have an infinite distance high-res skybox in UE4 for a space-shooter ive been playing with, And came to the realisation that I could use a cubemap along with a depth test to acheive the desired result.

Below screenshot is 1280x720 using 2048 cubemap.

Just thought id share in case anyone else has been struggling with this.

Thats awesome! I was struggling with this on another game a few years ago… not easy. Nice solution, altho I don’t really understand it, but I think I can copy what you did there a dissect it.

Its very simple. All its doing is testing the depth buffer(If you wired the output of Frac directly into emissive you would see the depth buffer).
Any pixel with a depth of 0 gets the cubemap while every other depth get the standard scene.

Sweet, will try this out

Very cool, thanks for the post :slight_smile:

So, you no longer use a Skybox or Skysphere at all?

Thats correct. Its purely a postprocess. I believe it currently doesnt deal with translucency(ive not tested it). but that shouldnt be too hard to implement if it doesnt.