by cyberax · 2w ago · 0 comments
Does anyone know the reason for that?
The lightmaps and such support colored lighting, but by default the software renderer just used the max IIRC of the color channels as a monochrome light value.
Just for giggles I recently had Claude rewrite the software renderer for Quake 2 to support true-color output and so could enable `sw_colorlight 1` when using the software renderer. Doing so results in the same reddish tint as the GL renderer, but with the software renderer aesthetics.
I think you can set `sw_colorlight` to `1` even in the classic renderer, but it'll look quite bad due to the limited colors afforded by the 8-bit palette.
Makes sense I guess, the plot takes place on Mars, so perhaps that's why they went heavy on the red-orange.
edit: uploaded some screenshots to show the difference:
Classic SW with `sw_colorlight 1`: https://imglink.cc/cdn/fv5Z3WB_aS.jpg
True-color SW with `sw_colorlight 1`: https://imglink.cc/cdn/fx8prYfGs6.jpg
In OpenGL mode colored lighting is there. But map designers overused it too much, especially in outdoor locations having yellow sky lighting, which looks somewhat depressive.
True perspective-correct 3D texturing (as opposed to the fake 3D in the DOOM engine, or the affine texturing of the PSX) on a 90 Mhz Pentium CPU.
Sure, the resolution was low (I think we were still in 320x200?), but that still doesn't give a lot of clock cycles for each pixel. 320x200 at 30 fps is 1,920,000 pixels per second. At 90 Mhz, that's only about 45 clock cycles per pixel on an architecture that could take several clock cycles per instruction.
The software renderer didn't do colored lights, but it still did dynamic lights from rockets and grenades, IIRC.
EDIT: Just realized we were talking about Quake II, not the first Quake. Whatever, still impressive.
The surface-building inner loop is particular efficient, because it consists of nothing more than interpolating intensity, combining it with a texel and using the result to look up a lit texel color, and storing the results with a dword write every four texels. In assembly language, we've gotten this code down to 2.25 cycles per lit texel in Quake. Similarly, the texture-mapping inner loop, which overlaps an FDIV for floating-point perspective correction with integer pixel drawing in 16-pixel bursts, has been squeezed down to 7.5 cycles per pixel on a Pentium, so the combined inner loop times for building and drawing a surface is roughly in the neighborhood of 10 cycles per pixel.
Half-Life 1 could also do colored lighting in software, the software-rendered and accelerated versions looked almost identical aside from the texture filtering.
Big difference from what I remember was water rendering with the software mode having some fun effects.