Showing posts from September, 2020

Moody Screenshots

I play Pegwars far more often than I work on it.   To be honest, most of the time when I sit down after-hours to work on the game, I simply don't know where to start.  I have so many 'backlog items' and ideas and the scope of the game is so huge that it's often really hard to choose exactly what to do.  The "burden of choice" as they say. So more often than not I'll simply hop in a spaceship, fly to some random systems in the galaxy, snap some screenshots and try to get inspired to work on some new feature or polish an existing one.  Indeed I've spent so much time 'searching for inspiration' that my current screenshots folder, which goes back to June 2015, currently has 5623 screenshots totalling 63.9GB... Since the new cloud shader went in, I've come across some really moody-looking systems and planets.   Systems with a dark green sun where you can barely see.   Blue suns, Bright orange suns.  Thick rolling clouds that reach down to the gr

Commander Kroton

"Infamous for its abundant micro-climates and irradiated soil, Asta is a planet that is relatively  unimportant." A city on the planet is perched around a field of luminescent crystals, providing it not only abundant resources but untold wealth and unsurpassed natural beauty. Commander Kroton sets his ship down gently in a garden just outside the city outskirts. He rents a modest but sunny apartment on the outskirts of a city situated within the planet's pink desert sands.   For a while the easy life prevails, but the novelty of a relaxing life of luxury soon fades and sure enough Kroton again feels the need to get busy. Leaving Asta on an underground mission to deliver medical supplies, sure enough he comes up against hardened defences "somewhere above Thefrel."  Not a problem thinks Kroton as he easily dispatches the threat with his pair of brand new beam lasers. He lands at a moonbase and offloads the precious blackmarket medicine for a wonder

Multi-Res Performance Optimisation for Atmosphere + Clouds

Volumetric Raymarching can be Very Costly Volumetric Raymarching can be very costly as many 100s of ray-marching operations are performed on the GPU each pixel for each frame.  A standard HD screen of 1920x1080 contains over 2 million pixels.    In the case of my atmosphere + cloud shader, this high fill-rate cost brings the game's frame-rate to its knees. In order to play Pegwars with cool new clouds in smooth realtime and iterate on the shader, I had to shade the planet and everything within the planet's atmosphere to a half-width, half-height render target.   This approach costs 1/4 of the fill-rate and renders around 4x faster, but the results as you can see are blocky and blurry.  Especially the building edges and the horizon lines are badly aliased : Multi-Resolution Shading As the atmosphere / cloud shader is very much fill-rate limited, either optimise the number of shader instructions per-pixel, or reduce the number of pixels shaded.  The goal for this technique is to