Back to the Vavoom Forum Archives


Forum

Colored lighting in 8-bit software

Fri, 28 May 2010 21:13:42

lei

How the heck was that pulled off!? And the ASM code for it! I didn't think there would another programmer around that dealt with extending Michael Abrash's asm routines. Does it generate 32768 lookup tables on the fly? I wonder if this possibly could be backported to software Quake with .lit support. Vavoom's CPP all over the place and cpp functions and syntaxes scare me though... Even the console background tint could be backported to restore Quake's original lost fadescreen function (for brown menu background)
Mon, 31 May 2010 18:27:17

Janis Legzdinsh

How the heck was that pulled off!? And the ASM code for it!
Back then I had a lots of time. It was an interesting experience.
I didn't think there would another programmer around that dealt with extending Michael Abrash's asm routines. Does it generate 32768 lookup tables on the fly?
Yes, it generates look-up tables during initialisation.
I wonder if this possibly could be backported to software Quake with .lit support. Vavoom's CPP all over the place and cpp functions and syntaxes scare me though... Even the console background tint could be backported to restore Quake's original lost fadescreen function (for brown menu background)
Since software renderer's code structure is mostly the same as it is in Quake, it should be quite easy to backport them.
Sun, 24 Oct 2010 14:57:40

lei

I've backported it, but ran into way too much trouble regarding its use of multiple lightptrs. In Quake, usually colored lighting use one lightptr and one blocklights ([18*18*18+3]) for it all, and the 3 lightptrs/blocklights approach isn't compatible as this. So unfortunately i am unable to make use of the surface8rgb assembly code. The RGB Surfaceblock stuff had to be rewritten and it doesn't use a colormap either - instead it has to take the slower approach to looking up the 8-bit pixel in a 24bit table, then attempt to process the lightmap over that, then turn it back to an 8-bit pixel in a 15-bit lookup table. This is because I failed to get the 'rgbtable + fadetable16' approach working. As for the background tint mentioned earlier, turns out the lookup needed to remake that is already in the quake source - just in r_polyse.c. I took that and used it to regain the ability for that <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->

Back to the Vavoom Forum Archives