However, its implementation did not behave consistently across the multiple possible configurations of the game. Configurations that introduces innacuracies in this effect's behavior are:
- Monitor aspect
- Video aspect (whether it's stretched to monitor aspect)
- Video resolution (desktop or fullscreen area)
- Image resolution (window or fullscreen area)
- Image scale (controlled by the viewsize cvar)
- Status bar (the classic one offsets the on-screen view position)
- Download this savegame, and place it in a clean installation of the game
- Start the game, open the console and enter this commandline: load waterwarptest;wait;wait;wait;wait;pause
At the resolution of 320x240, which was the default 4:3 resolution the renderer was programmed for (as confirmed by all the multiple occurrences of these dimensions as base values for the rendering calculations in the engine's source code), it looks like this: The above screenshot was upscaled 4 times, to serve as a base for comparison against the highest 4:3 resolution supported by the vanilla WinQuake engine, which is 1280x960.
The 4:3 aspect was chosen because it is the only one that WinQuake can render at.
The window borders were kept to make sure that the output image resolution was accurately set.
By following this test, here's how the waterwarp looks at 1280x960 in WinQuake and several other engines.
The borders of the following screenshots were padded to align the contents of their windows to the contents of the original 320x240 screenshot above, which allows for easier per-pixel comparisons.
These are rendered at exactly the same frame in time, and the same position in space, as provided by the waterwarptest.sav savegame:
- WinQuake, 1280x960
Retroquad
FTE QuakeWorld (note: pausing the game didn't pause the waterwarp effect, so the exact frame in time couldn't be captured)
QuakeSpasm
Mark V
Mark V, software rendering
qbismSuper8
Engoo (note: r_waterwarp is disabled by default in this engine, and crashes when enabled)
"WinQuake Mark V" at 1280x960 is consistent with vanilla WinQuake at the same resolution, but this is actually a false positive, since WinQuake is not consistent with itself.
Retroquad is not only accurate at 1280x960, but it is also consistently accurate across multiple resolutions and aspects, in both windowed and fullscreen video modes.
The algorithm it uses was developed for the Makaqu engine, and here is an animated collection of screenshots for comparing exactly the same scene across many different configurations.
Each screenshot in the animation linked above was scaled and offset to align their contents for per-pixel comparisons.
FTEQW is also consistent across multiple resolutions, but since there's no way to pause its waterwarp effect, there's no way to make an animated screenshot comparison like the above.
Algorithm
The properly-scaled submerged screen warping algorithm from the Makaqu engine was posted in this topic 3 years and a half ago.
For comparison purposes, the original WinQuake algorithm, with all its inconsistencies, can be found here.
And the FTEQW source code can be found in its official website.