Howdy, I've escaped momentarily from inside3d, but some here may be interested in quake2 software rendering. A ref_soft.dll replacement has been made based on Knightmare's 3.24 patch. As far as I know, it ONLY works with 3.24. Features-
Colored lighting. r_coloredlights cvar toggle 0/1
Colored light saturation controlled by r_lightsaturation cvar. 1.0 is default, try 2.0 or 0.5.
Ddraw palette issue is 'fixed' because it is removed. All video modes are now DIB.
Waterwarp is higher resolution and supports widescreen modes.
sw_transmooth toggle 0/1 smooths out water and other transparent surfaces.
Render functions aren't assembly, but the C source code adds significant speed optimizations.
Notes about the code- It can be copied into the 3.24 source folder. (Make a backup for this purpose.) But I don't have VC 6, so I built it with VS 2013 (project included in the ref_soft folder). id386 needs to be undefined (or defined as 0). qshared.h has to be modified manually for this. This started with the colored light code leilei added to stock Q2. Shaded light was completed among other things with head-scratching and borrowed pieces of engoo. Waterwarp improvement and dithering are from AROS Quake2.
Post by knightmare on May 31, 2014 11:23:51 GMT -5
This is excellent!
Argh was working on adding colored lighting support and 16-bit rendering to ref_soft before he disappeared back in 2005 or 2006.
I tried making some simple changes to ref_soft to allow trans surfaces to animate and move as part of bmodels, but all the ASM code prevented it from working. Ditto for adding support for maps compiled with large (> 240) chop sizes (8-bit registers were used to index the size of surfaces). Maybe that would be doable now that you've switched over to C only.
After some quick testing, this does seem to work with v3.20 and my v3.23.
I'd like to include this in a future release. Could you possibly include a project file for VS2008? That's what I've switched my KMQ2 development over to, and will probably use for any further work on the unofficial Q2 patch.
id386 can be #undefed in r_local.h.
BTW, you forgot to add that unsigned short fix to Mod_LoadLeafs(), see here.
Thanks, I will include those fixes in next release.
I don't have VS2008 installed, but VS2010 will open VS2013, so maybe it will work as-is.
I can provide VS2013 project files for unofficial patch and kmq2 if you'd like to consider that. The projects will work with the free Express version. I've already imported kmq2 to VS2013 just to look at the source, so hopefully it will compile! Executables will still run on XP if the XP platform toolset is selected. I've run this ref_soft.dll on an XP box with no issues.
I already have VS2008 and 2010 projects for the KMQ2 dev version, and have VS2005 and 2008 projects for the 0.20 version I keep patched.
VS 2005/2008 use a different project file format than 2010/2012/2013, so 2013 ones won't help me. I also have a set of updated libs as well.
EDIT: It would also be desirable to have a cvar for toggling the colored lighting. While it sometimes looks good, it really has too few palette colors to work with as long as it's using 8-bit rendering.
Last Edit: Jun 1, 2014 2:01:41 GMT -5 by knightmare
This one sounds good. I don`t have VS and don`t know anything about compiling a source. Could anyone of yo be so kind and upload a compiled version of this ? I would really like to try it out. Thx in advance
Just tried it out myself. It's pretty oldschool looking on software mode normally, but with the added coloured lighting it looks more like an old relic lol. Different, and well done, but I'll stick to KMQ2 OpenGL