I recently added a rendering pass in my engine to compute volumetric shapes via raymarching. Mostly to cast volumetric shadows with spot lights.
I render them at half resolution to save a bit on performance and keep it cheap. However I'm struggling to find a good upscale algorithm. Bilateral weights based on the differences on the depth buffer isn't enough.
I'm not sure what I could do better, without temporal anti-aliasing. I'm open to suggestions ☺️
To illustrate a bit, In the worst-case scenario this is how it looks like:
I use a 3x3 bilateral filter, each sample is weighted by both spatial distance (sub-pixel position within the half-res grid) and depth
similarity (to prevent light bleeding across silhouettes).