Rendering Nebulae
New Nebulae Recently I began replacing the old particle-based nebula standin with proper volumetric nebula shaders. The nebulae need to be many and varied, and so I want to procedurally generate them like the rest of the universe. After being introduced to some awesome volumetric nebula examples on ShaderToy, I thought I'd too have a play around with ray-tracing a noise field to create procedural nebulae. The end result looks something like this : Ray Tracing a Noise Field The general algorithm for rendering a volumetric noise field: - for each pixel on the screen, cast a ray from far to near (or near to far based on your needs) - at each step, accumulate density by looking up procedural noise functions - in this case, a fractal brownian motion function. - return the accumulated density, to be manipulated for the final pixel colour. This is a very basic implementation of volumetric ray-tracing, and runs very slow for the output quality. ...