Procedural Night Sky
Nov 7, 2016·
·
1 min read

Ben Ahlbrand

I generated a procedural night sky w/transparent quads w/a radial fall off in my c++ rendering framework.
The algorithm is pretty simple and goes something like:
// the trick is to sample an interesting distribution ;)
pts = sampleRange(xMagnitude, yMagnitude, zMagnitude, numStars)
render(pts)
captureSkybox()
// typical main loop here
while (true) {
drawSkybox()
drawScene()
...
}