SakeTami
mankrip
mankrip

patreon


Underwater Blurriness and Better Horizon Dithering

I'm implementing a higher-res dithering matrix (8x8=64 units) for the sky horizon color fading effect. As can be seen in the first image, the higher-res dithering matrix significantly smooths out the color banding. However, this requires a slightly bigger color fading table, so when this improvement is finished, all sky horizon fading maps will have to be recompiled.

Afterwards I'm going to implement this same higher-res matrix in the fog renderer, to smooth out the egregious color banding that's visible when rendering thick fog on dark areas. This will also allow me to make the underwater fog thicker, because the fog when swimming into the slime is too faint (I had to make it very faint for it to look acceptable in maps such as E3M1, which has very dark areas submerged in the slime).

I'm also pondering if this higher-res matrix could be useful to improve the lighting. There are some user-made maps where the lighting looks very bad in the Quake palette (despite running on Retroquad) because of a similarly egregious color banding, specially on light gray textures. However, the additional variables needed to raster this higher-res dithering matrix could make the rasterizer heavier on the CPU caches, so I don't know if the performance would be acceptable.

And finally, I've implemented independent mipmap scaling for underwater surfaces, making the underwater surfaces look blurrier when seen from the outside of the water (see the other screenshots in this post). This helps a bit to simulate the turbidity aspect of real liquids, but to achieve good turbidity visuals I also need to figure out a way to implement volumetric fog so the liquids can look foggy from the outside.

The code for the independent mipmap scaling of underwater surfaces is also the first step needed for implementing underwater caustics. I'd like to implement lightmap-based underwater caustics, similar to how the Saturn port of Quake did it (seriously, see how well it fits Quake's visual style), but I'm still unsure of how to draw the caustics effect onto the surface lighting caches. The caustics must be rendered in a volumetric way onto the surface caches, to ensure continuity across the edges of neighboring polygons (the Saturn port doesn't need to care about this since it doesn't have bilinear filtering on lightmaps). Also, I'll need to figure out a way to implement animated lightmap-based caustics without slowing down the renderer too much, because animated lightstyles does have a significant impact on performance.

Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering Underwater Blurriness and Better Horizon Dithering

More Creators