Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

FTEQW: Porting 32-bit color software renderer? Goto page 1, 2 Next

| Inside3d Forums Forum Index -> Engine Programming

View previous topic :: View next topic
Author | Message
--- | ---
Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Tue Jan 05, 2010 12:29 pm Post subject: FTEQW: Porting 32-bit color software renderer? |

I'm putting this somewhere near the upper-bottom of the deck, but recent events have made me want full color software rendering: 1. goldenboy's love of software renderers 2. my love of Half-Life levels of color 3. Annoyance that 8-bit software renderer using same skyboxes as 3D accelerated engines would require either mappers make 2 versions or silly color reduction function.
4. Awareness of water transparency in Makaqu.
5. Noticing model interpolation in Makaqu
6. FlashQuake is software renderer
... well, some say software renderers are yesterday's news and maybe it's true. Still if it isn't overly difficult ...
Assessing Complexity
FTEQW's software renderer supports all kinds of things ... even decals. However, I'm just shooting for the ability to load a Half-Life map level of color and hopefully support the same skyboxes that FitzQuake (OpenGL) and DirectQ (Direct3D) and every other engine can load.
This follows the theme of the software renderer supporting the same media as the OpenGL and Direct3D engines (and whatever alternate APIs the alternate platform engines use).
One media should work in all engines.
FTE and r_pixbytes
FTEQW supports 8-bit, 16-bit and 32-bit color. Quake's original software renderer supported, as far as I can tell, 16 bit color and I'm thinking it translated it down to 8?
Anyway:
8-bit = 1 byte
16-bit = 2 bytes
32-bit = 4 bytes (and I'm guessing that one byte is unused)
Since FTEQW supports 3 pixel depths the easiest way to assess the difficulty is searching for "r_pixelbytes" in the source:

Quote:
C:\engine\ftesrc3343-all\sw\d_edge.c(88 ): if (r_pixbytes == 4) C:\engine\ftesrc3343-all\sw\d_edge.c(103): else if (r_pixbytes == 2) C:\engine\ftesrc3343-all\sw\d_edge.c(281): if (r_pixbytes == 4) C:\engine\ftesrc3343-all\sw\d_edge.c(283): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_edge.c(314): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_edge.c(364): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_edge.c(366): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_iface.h(118 ): extern int r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_init.c(64): if (!r_pixbytes)
C:\engine\ftesrc3343-all\sw\d_init.c(65): r_pixbytes = 1;
C:\engine\ftesrc3343-all\sw\d_init.c(160): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_init.c(162): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_init.c(171): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_init.c(178 ): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_part.c(373): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_part.c(378 ): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_part.c(863): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_part.c(868 ): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_polyse.c(820): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(821): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(822): d_pdest = (qbyte *)d_viewbuffer + (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(884): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(885): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(886): d_pdest = (qbyte *)d_viewbuffer + (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(933): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_polyse.c(940): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_polyse.c(972): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_polyse.c(979): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1149): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1151): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1153): else //if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1158 ): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1537): if (r_affinetridesc.skinwidth*r_pixbytes != skinwidth ||
C:\engine\ftesrc3343-all\sw\d_polyse.c(1540): skinwidth = r_affinetridesc.skinwidth*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1868 ): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_polyse.c(1919): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1920): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1922): (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1990): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1991): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(1992): d_pdest = (qbyte *)d_viewbuffer + (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2082): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_polyse.c(2133): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2134): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2136): (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2204): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2205): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2206): d_pdest = (qbyte *)d_viewbuffer + (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2341): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2342): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2344): (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2412): d_pdestbasestep = (screenwidth + ubasestep)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2413): d_pdestextrastep = d_pdestbasestep + r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_polyse.c(2414): d_pdest = (qbyte *)d_viewbuffer + (ystart * screenwidth + plefttop[0])*r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_sprite.c(62): pdest = (qbyte *)d_viewbuffer + r_pixbytes*((screenwidth * pspan->v) + pspan->u);
C:\engine\ftesrc3343-all\sw\d_sprite.c(1067): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_sprite.c(1069): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_surf.c(287): bpp = r_pixbytes;
C:\engine\ftesrc3343-all\sw\d_trans.c(469): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_trans.c(499): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_trans.c(530): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_trans.c(573): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_trans.c(603): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_trans.c(632): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\d_trans.c(673): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\d_trans.c(703): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\d_trans.c(732): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(315): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(317): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\r_alias.c(598 ): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(600): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\r_alias.c(615): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(682): if (currententity->scoreboard && r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\r_alias.c(691): if (base && skin->cachedbpp == r_pixbytes*8 )
C:\engine\ftesrc3343-all\sw\r_alias.c(698 ): else if (currententity->scoreboard && r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(707): if (base && skin->cachedbpp == r_pixbytes*8 )
C:\engine\ftesrc3343-all\sw\r_alias.c(724): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_alias.c(875): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\r_alias.c(922): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\r_draw.c(1658 ): s_spanletvars.pdest = (qbyte *)d_viewbuffer + r_pixbytes*( d_scantable[pspan->v] /*r_screenwidth * pspan->v*/ + pspan->u);
C:\engine\ftesrc3343-all\sw\r_draw.c(2109): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_draw.c(2124): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\r_main.c(42): int r_pixbytes = 1;
C:\engine\ftesrc3343-all\sw\r_main.c(563): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\r_misc.c(129): switch (r_pixbytes)
C:\engine\ftesrc3343-all\sw\r_misc.c(580): if (vid.width > MAXWIDTH || r_pixbytes != 1 || scr_chatmode)
C:\engine\ftesrc3343-all\sw\r_surf.c(1104): if (r_pixbytes == 1 || r_pixbytes == 4) //if we are using 4, textures are stored as 1 and expanded acording to palette
C:\engine\ftesrc3343-all\sw\r_surf.c(1164): if (r_pixbytes == 1 || r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\r_surf.c(1854): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\r_surf.c(1867): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(574): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(600): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(627): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(724): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(778 ): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(819): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(824): dest = vid.conbuffer + (y*vid.conrowbytes + x)*r_pixbytes;
C:\engine\ftesrc3343-all\sw\sw_draw.c(840): dest += vid.conrowbytes*r_pixbytes;
C:\engine\ftesrc3343-all\sw\sw_draw.c(857): dest += vid.conrowbytes*r_pixbytes;
C:\engine\ftesrc3343-all\sw\sw_draw.c(899): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(904): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1071): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1082): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1095): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1131): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1176): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1189): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1229): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1240): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1253): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1290): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1335): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1380): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1443): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1488 ): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1533): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1580): Sys_Error("draw_transpictranslate: r_pixbytes\n");
C:\engine\ftesrc3343-all\sw\sw_draw.c(1896): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1918 ): switch (r_pixbytes)
C:\engine\ftesrc3343-all\sw\sw_draw.c(1996): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2000): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2067): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2122): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2476): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2480): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2550): switch (r_pixbytes)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2577): switch (r_pixbytes)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2605): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_draw.c(2618 ): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_model.c(860): if (r_pixbytes == 4) //using 24 bit lighting
C:\engine\ftesrc3343-all\sw\sw_model.c(2334): pskin = Hunk_AllocName (skinsize * r_pixbytes, loadname);
C:\engine\ftesrc3343-all\sw\sw_model.c(2338 ): if (r_pixbytes == 1 || r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_model.c(2342): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_model.c(2352): Sys_Error ("Mod_LoadAliasSkin: driver set invalid r_pixbytes: %d\n",
C:\engine\ftesrc3343-all\sw\sw_model.c(2353): r_pixbytes);
C:\engine\ftesrc3343-all\sw\sw_model.c(3037): skin = Hunk_AllocName(skinsize*r_pixbytes, loadname);
C:\engine\ftesrc3343-all\sw\sw_model.c(3038 ): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_model.c(3379): skin = Hunk_AllocName(skinsize*r_pixbytes, loadname);
C:\engine\ftesrc3343-all\sw\sw_model.c(3380): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_model.c(3559): pspriteframe = Hunk_AllocName (sizeof (mspriteframe_t) + size*r_pixbytes,
C:\engine\ftesrc3343-all\sw\sw_model.c(3575): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\sw_model.c(3597): else if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\sw_model.c(3629): else if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_model.c(3655): Sys_Error ("Mod_LoadSpriteFrame: driver set invalid r_pixbytes: %d\n",
C:\engine\ftesrc3343-all\sw\sw_model.c(3656): r_pixbytes);
C:\engine\ftesrc3343-all\sw\sw_model.c(3893): frame = psprite->frames[mod->numframes].frameptr = Hunk_AllocName(sizeof(mspriteframe_t)+width*r_pixbytes*height, loadname);
C:\engine\ftesrc3343-all\sw\sw_model.c(3905): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\sw_screen.c(225): if (r_pixbytes == 4)
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(201): if ( ( ddrval = lpDirectDraw->lpVtbl->SetDisplayMode( lpDirectDraw, vid.width, vid.height, r_pixbytes*8, info->rate, 0 ) ) == DD_OK )
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(234): if ( ( ddrval = lpDirectDraw->lpVtbl->SetDisplayMode( lpDirectDraw, vid.width, vid.height, r_pixbytes*8, info->rate, 0 ) ) != DD_OK )
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(285): i = r_pixbytes;
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(287): r_pixbytes = 4;
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(289): r_pixbytes = 1;
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(291): if (r_pixbytes != i && cls.state)
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(294): r_pixbytes = i;
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(300): /* if ( ( ddrval = lpDirectDraw->lpVtbl->SetDisplayMode( lpDirectDraw, vid.width, vid.height, r_pixbytes*8 ) ) != DD_OK )
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(373): if (r_pixbytes == 1)
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(420): if (r_pixbytes == 2)
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(455): *ppitch = ddsd.lPitch/r_pixbytes;
C:\engine\ftesrc3343-all\sw\vid_ddraw.c(735): vid.conrowbytes = vid.rowbytes = ddsd.lPitch/r_pixbytes;
C:\engine\ftesrc3343-all\sw\vid_dib.c(124): pbmiDIB->bmiHeader.biBitCount = r_pixbytes*8;
C:\engine\ftesrc3343-all\sw\vid_dib.c(161): *ppbuffer = pDIBBase + ( vid.height - 1 ) * vid.width * r_pixbytes;
C:\engine\ftesrc3343-all\sw\vid_dib.c(174): memset( pDIBBase, 0xff, vid.width * vid.height * r_pixbytes);
C:\engine\ftesrc3343-all\sw\vid_dib.c(228 ): if (r_pixbytes == 1 && hdcDIBSection )
C:\engine\ftesrc3343-all\sw\vid_win2.c(76): if (r_pixbytes == 2) //16 bit needs a 16 bit colormap.
C:\engine\ftesrc3343-all\sw\vid_win2.c(336): if (VID_AllocBuffers(vid.width, vid.height, r_pixbytes))
C:\engine\ftesrc3343-all\sw\vid_win2.c(799): VID_AllocBuffers(info->width, info->height, r_pixbytes);
C:\engine\ftesrc3343-all\sw\vid_win2.c(904): r_pixbytes = 4;
C:\engine\ftesrc3343-all\sw\vid_win2.c(906): r_pixbytes = 2;
C:\engine\ftesrc3343-all\sw\vid_win2.c(908 ): r_pixbytes = 1;

There is a LOT of color depth translation in FTEQW. And it supports decals and apparently transparency of some sort for possibly rendering effects (blood? decals? maybe even md3?) and those aren't in the scope of what I'd be porting so I could ignore those. Still ...
It looks like some formidable work. My guess is that there are a few unexpected curves too. I see something in there about checking memory and it is possible for a desktop to be in 16 color or even 8 bit mode and I guess that would need to be checked.
And I'm sure some oddball stuff would need to be done on texture and lmp load.
Porting FTEQW 24-bit color to, say, stock WinQuake: Moderate Difficulty

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Tue Jan 05, 2010 2:55 pm Post subject: |

Minimum potential of software renderer + skybox. Makaqu and a skybox I creatively repaletted to make it sure it wasn't crapified: Click to enlarge: This is only an 8-bit skybox! 24 bit 512x512 should be fine.

Back to top |

goldenboy Joined: 05 Sep 2008 Posts: 310 Location: Kiel |

Posted: Wed Jan 06, 2010 12:52 am Post subject: |

There are some others who like software Even without looking to QW and legoquake, I know of two very productive community members who use software renderers. I haven't used it for a while myself, just recently loaded it up to check something. This is a major point in the software renderer discussion. Have it around to check stuff, for reference, and for historical reasons. The other major point is that it might be needed on some platforms or by some implementations (Flash Quake).
Personally I wouldn't want to use it daily, actually I prefer Darkplaces lately because I like the look (I use FitzSDL when lighting maps, though, since DP's lighting is notably different).
I keep it around, though.
Arguing that the software renderer should be dumped because "it's 1999, man!" is more than a bit backwards... It isn't really "pixelquake" either - you get the same pixel look in GL renderers when you use the original skins and textures. In typical surroundings, such as e1m6, without the large visible sky and without lots of transparent water visible, software actually looks good enough.
32 bit software looks more than good enough.
Basically I only use Darkplaces for the shiny rocket trails and the sparks. YES, I KNOW THAT DARKPLACES IS NOT JUST ABOUT EYECANDY. However, modding features don't have so much to do with the renderer.
You can run xavior's csqc gui mod in FTE's software renderer just fine. Just as an example.
_________________
ReMakeQuake
The Realm of Blog Magic

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Wed Jan 06, 2010 2:00 am Post subject: |

not disliking software either in fact a game i still enjoy took software rendering to a whole new lvl with shadow volumes and the best damn water i ever seen. granted it used a hybrid heightmap/voxel engine. you might even know it its called outcast
some pics from the game
http://images.google.dk/images?hl=da&source=hp&q=outcast&um=1&ie=UTF-8&ei=ku5DS66rGoWH_Ab92-XoAQ&sa=X&oi=image_result_group&ct=title&resnum=4&ved=0CCoQsAQwAw

Back to top |

JasonX Joined: 21 Apr 2009 Posts: 89 |

Posted: Tue Jan 19, 2010 11:22 am Post subject: |

Have you made any progress with this? Are you using ProQuake as the port base?

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Tue Jan 19, 2010 1:23 pm Post subject: |

goldenboy wrote:
(I use FitzSDL when lighting maps, though, since DP's lighting is notably different).

I've heard DP actually renders the lighting like software quake does (with overbrights), meaning it's more close to the "proper" look than say GLQuake. Dunno if Fitz does overbrights. It's interesting though, what it is that makes DP look so different, rendering- or lightingwise, whatever you want to call it.
_________________
Look out for Twigboy

Back to top |

mh Joined: 12 Jan 2008 Posts: 909 |

Posted: Tue Jan 19, 2010 2:23 pm Post subject: |

Fitz does overbrights too, and metlslime is very particular about doing things the same way as software Quake did them. The major difference with DP would be on account of all the RT stuff that's enabled by default (?on appropriate hardware only?), and the labyrinth of cvars (like r_realtime_lightmap_dynamic_world_ha_ha_im_only_making_the_name_this_long_to_annoy_you) (joke) you need to go through in order to switch it off.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines

Back to top |

Urre Joined: 05 Nov 2004 Posts: 1073 Location: Sweden |

Posted: Tue Jan 19, 2010 2:58 pm Post subject: |

There's menu commands for turning stuff off with a single button press... However, that still doesn't make it render the same, it still does something different, or so it feels like. I should take screenshots of areas with all funky DP effects turned off, and compare with screenshots from Fitz.
_________________
Look out for Twigboy

Back to top |

MDave Joined: 17 Dec 2007 Posts: 75 |

Posted: Tue Jan 19, 2010 6:01 pm Post subject: |

It would be nice to see some sort of software effect for bilinear filtering textures http://www.gamedev.net/reference/articles/article669.asp http://www.masm32.com/board/index.php?topic=12138.msg92889 http://cboard.cprogramming.com/game-programming/19926-super-fast-bilinear-interpolation.html

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Tue Jan 19, 2010 6:05 pm Post subject: |

JasonX wrote:
Have you made any progress with this? Are you using ProQuake as the port base?

Haven't attempted yet. Eh? Maybe this is today's fun activity -- seeing if I can port it.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

JasonX Joined: 21 Apr 2009 Posts: 89 |

Posted: Tue Jan 19, 2010 11:21 pm Post subject: |

Software rendering with bilinear filtering? Sounds like a dream.

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Fri Jan 22, 2010 12:34 am Post subject: |

Here are 2 screenshots of FTEQW's magnificient 24-bit (32 bit) software renderer. The following is a Half-Life map: And shot #2: you see sparks from firing the gun and the black spots on the wall are decals where I shot the wall: If I try to port the 32-bit color support, I'm not going to give myself a super-migraine --- it'll just be the 32-bit color support for map rendering -- not all the special particle effects and so forth.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Fri Jan 22, 2010 12:44 am Post subject: |

32bit rendering requires that your framebuffer be 32bit. your framebuffer being 32bit requires that you touch _all_ the rendering code, or at least anything that puts colour onto the screen. Enjoy! _________________ What's a signature?

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Fri Jan 22, 2010 1:21 am Post subject: |

Spike wrote:
32bit rendering requires that your framebuffer be 32bit. your framebuffer being 32bit requires that you touch _all_ the rendering code, or at least anything that puts colour onto the screen. Enjoy!

The original WinQuake source code has 8-bit to 16-bit color conversions using d_8to16table and all of them are marked with r_pixbytes == 2

Code:
/* ================= Mod_LoadAliasSkin ================= */
void * Mod_LoadAliasSkin (void * pin, int *pskinindex, int skinsize,
aliashdr_t *pheader)
{
int i;
byte *pskin, *pinskin;
unsigned short *pusskin;
pskin = Hunk_AllocName (skinsize * r_pixbytes, loadname);
pinskin = (byte *)pin;
*pskinindex = (byte *)pskin - (byte *)pheader;
if (r_pixbytes == 1)
{
Q_memcpy (pskin, pinskin, skinsize);
}
else if (r_pixbytes == 2)
{
pusskin = (unsigned short *)pskin;
for (i=0 ; i<skinsize ; i++)
pusskin[i] = d_8to16table[pinskin[i]];
}
else
{
Sys_Error ("Mod_LoadAliasSkin: driver set invalid r_pixbytes: %d\n",
r_pixbytes);
}
pinskin += skinsize;
return ((void *)pinskin);
}

And thanks to this marking I am able to at least identify everywhere that the changes would need to be made that don't involve the setup ...

Code:
d_iface.h(129): extern int r_pixbytes; d_init.c(60): r_pixbytes = 1; draw.c(169): if (r_pixbytes == 1) draw.c(305): if (r_pixbytes == 1) draw.c(354): if (r_pixbytes == 1)
draw.c(441): if (r_pixbytes == 1)
draw.c(569): if (r_pixbytes == 1)
draw.c(784): if (r_pixbytes == 1)
draw.c(819): if (r_pixbytes == 1)
model.c(1355): pskin = Hunk_AllocName (skinsize * r_pixbytes, loadname);
model.c(1359): if (r_pixbytes == 1)
model.c(1363): else if (r_pixbytes == 2)
model.c(1372): Sys_Error ("Mod_LoadAliasSkin: driver set invalid r_pixbytes: %d\n",
model.c(1373): r_pixbytes);
model.c(1683): pspriteframe = Hunk_AllocName (sizeof (mspriteframe_t) + size*r_pixbytes,
model.c(1699): if (r_pixbytes == 1)
model.c(1703): else if (r_pixbytes == 2)
model.c(1713): Sys_Error ("Mod_LoadSpriteFrame: driver set invalid r_pixbytes: %d\n",
model.c(1714): r_pixbytes);
r_main.c(36): int r_pixbytes = 1;
r_main.c(466): if (r_pixbytes == 1)
r_surf.c(284): if (r_pixbytes == 1)
r_surf.c(651): if (r_pixbytes == 1)
r_surf.c(664): if (r_pixbytes == 1)
Found 24 occurrence(s) in 6 file(s)

So have the basis of at least how to approach it.
I'm crazy enough about the idea of Half-Life levels of colors and don't want the lack of software renderer support to kill the idea of a Quake 2.0 map standard.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Fri Jan 22, 2010 1:55 am Post subject: |

If you remember (just kidding) the old quakepix.zip, (Aug. 1995) it had some 24-bit colour shots. Apparently the Quake engine could do 24-bit colour back then. I'm sure it was ridiculously slow. _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Engine Programming | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group