surf8.s asm - taking out the lightmap smoothing

Discuss programming topics for the various GPL'd game engine sources.
mankrip
Posts: 924
Joined: Fri Jul 04, 2008 3:02 am

Re: surf8.s asm - taking out the lightmap smoothing

Post by mankrip »

leileilol wrote:r_fullbright doesn't actually disable lightmap blend. Even r_fullbright could be faster by just taking out the light blend functions from the surf8 completely as yet another surfmipblock set, which would also lead to fullbright not going overbright since there would be no colormap used.
The fullbright formula is corrected in Makaqu. I had to fix it way back in 2007 because Fightoon's stages wouldn't use lightmaps.

However, that fix only works for colormaps with a range of 2. If I recall correctly, lit sprites in Makaqu 1.5 have a better formula for that; I've coded them to never go overbright.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: surf8.s asm - taking out the lightmap smoothing

Post by leileilol »

More results, this time with memory waitstates to 0 (woo bios tweaks), timedemo demo2

Viewsize 100 (default):
No lightmap smoothing: 13.8fps avg
Lightmap smoothing: 13.6fps avg

Smallest viewsize:
No lightmap smoothing: 22.6fps avg
Lightmap smoothing: 22.5fps avg

The mip bias differs in a smaller viewsize I think, so the difference isn't as large.

EDIT: -nosound results:
Viewsize 100 (default):
No lightmap smoothing: 14.5fps avg
Lightmap smoothing: 14.3fps avg

Smallest viewsize:
No lightmap smoothing: 24.2fps avg
Lightmap smoothing: 24.2fps avg (WTF!?)


For what it's worth, here's an Engoo dos build benchmark run, also -nosound (since sound's C this time)...

Viewsize 100 (default):
No lightmap smoothing: 11.4fps avg
Lightmap smoothing: 11.3fps avg

Smallest viewsize:
No lightmap smoothing: 22.2fps avg
Lightmap smoothing: 22.1fps avg

Viewsize 100, r_lowdetail 1:
No lightmap smoothing: 14.7fps avg
Lightmap smoothing: 14.6fps avg

Viewsize 100, r_lowdetail 1, d_mipscale 6:
No lightmap smoothing: 15.1fps avg
Lightmap smoothing: 15.1fps avg

Viewsize 100, r_shadowhack 1 (model shadows):
No lightmap smoothing: 10.3fps avg
Lightmap smoothing: 10.1fps avg


and for the hell of it, here's how slow my colored lighting is
Viewsize 100 r_coloredlights 1:
15-bit: 6.2fps avg
18-bit: 6.2fps avg

Funny how a bigger lookup table for lighting makes no difference on a cacheless 486.
i should not be here
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: surf8.s asm - taking out the lightmap smoothing

Post by mh »

It's obviously bottlenecking in so many other places that this is making quite a small difference. Have you tried it with r_drawentities 0? That would help to isolate the performance difference from no smoothing a little more. Also demo2 is probably not the best choice for benchmarking this particular item on such a slow machine as the underwater warp will make up a large proportion of your frame time.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
Post Reply