Samuel Mráz

3rd year studying Computer Games and Graphics at CTU FEE

Daydreaming about making games

Nebula Express - Playing with 3D Domain Warping Shaders

Article | February 14, 2026 | Tags: Unity, C#, HLSL, Shader Graph


Gameplay gif

The Game

Nebula Express is a 3D Snake clone where you ride a train in space. To be honest I am not sure where I got the idea for this, I just remember that I wanted to make a game with the Kenney train asset pack.

Upon seeing the twisted rails in the asset pack, i wanted to try to connect them freely, building a crazy roller coaster ride. The rail models only had a few variations, so I created a vertex shader that could bend and twist the rails and I made it follow a spline.

Gif showing rails being placed on a spline

With that done, I added a train that moved on the rails. I then started searching for some space skyboxes. It was a game about a train in space, after all.

The Skybox

I was quite unsatisfied with what was available online for free, every skybox was static and did not really look like I envisioned. I decided I would create my own dynamic sky.

The technique I settled on was a fragment shader on the skybox itself. I initially wanted to project some 2D noise on a sphere (the skybox) to create clouds, but I would somehow need to create a mapping from 2D to sphere, while accounting for seams... Instead I opted to use 3D noise, sampled at a sphere's surface. This would create a 2D slice of the 3D noise.

3D Perlin Noise and Domain Warping

I stumbled on an interesting article by Inigo Quilez about Domain Warping.

The Shader

blabla 3D noise asset, domain warping implementation

shader graph, movement, multiple layers, stars, sun

Conclusion

cool graphics, shit gameplay

Lets talk!
hi@samuelmraz.dev