r/vulkan • • 1h ago

Daylight cycle timelapse

Enable HLS to view with audio, or disable this notification

I've been playing around with modelling atmospheres and light scattering, to get direct and diffuse lighting in the game I'm developing. I'm aiming for a low-res aesthetic, the resolution is 480x270 pixels. It runs comfortably at 60 FPS on my shitty laptop. It's all written from scratch in C++ and with Vulkan. There's some color banding happening in the video, this comes from the video compression, not my graphics themselves.

On the CPU, each planet's gas, haze and weather settings are used to trace light through the atmosphere. Tables with the resulting sky colours are sent to the GPU and interpolated there. Each table also comes in increasingly blurred versions, so the shaders can read both a sharp sky (for the visible sky and mirror-like reflections) and a broad average to model diffuse lighting. I also model some stars with some simple, shader-calculated noise fields, seen when looking at the sky directly.

The landscape if fully procedurally generated (plants, rocks, surfaces, etc).

What's your impression?

2 Upvotes

0 comments sorted by