Baker wrote:
One example, I figured out how to enable intermap travel (which requires saving the state of any exited level) and have it save to a single file (a holy grail to me, I cannot accept a save game being more than 1 file under any circumstances --- you can share a single file, for example), instead of a sloppy directory of several save game files. The trick --- write a pak file save game file. Which requires the ability to write files easily to a pak and even replace, which I did.
thanks for making me feel bad. its a shame q2 actually requires directories though.
ericw wrote:
I think it actually doesn't quite work; say you mix 50% black (0.0) and 50% white (1.0). If you gamma correct the colours before mixing, they stay the same, since 1^gamma = 1 and 0^gamma = 0, so the blend result is 0.5 regardless of gamma.
If you gamma correct after blending, you get a result of 0.5^gamma, which could be far from 0.5.
correct.
note that lightmaps+textures are traditionally linearly blended onto the framebuffer, which is thus subject to about 2.2 gamma (0.45 if you're using quake's gamma).
this makes the lighting ALL WRONG!
but people don't seem to care that much. oh well.
typically you can get away with not actually implementing gamma at all, but rather using a contrast shader. really its just an extra fullscreen pass that uses some weird blendfunc to double the framebuffer's values a few times (or less). this not only avoids the ugly whitening thing, but also avoids needing to use glCopyTexImage.
or you can do contrast stuff with glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, GL_FALSE); and scaling up your glColor values beyond 1 (or use glsl+attributes instead). hurah, no post processing needed at all.
2ms is significant
700fps dropping to 300fps is a serious drop.
yes, its only 1.91ms, but that's more than 1.42 and thus means you're spending MORE time just drawing gamma than you are updating+networking+drawing the scene in the first place!
the whole framerate timing thing revolves around counting drops of 20fps, and how they're insignificant compared to 700fps and absolutely decimating when compared to 200 fps (hah! the REAL meaning of decimate! read 60fps if you want a more serious example).
800->400fps is the same loss as 80->40fps. ie: ratios of rates are accurate, and those are what was referred to earlier in the topic by dimman.
a >50% drop is only acceptable if you consider the complexity and overdraw of the various shaders. on one hand you have all the game overhead combined with sampling two textures with a multiplication. on the other hand you have a single texture read with an exponent.
obviously with complex scenes, quake tends to get cpu-bound instead, leaving the gpu idle enough to do its highly expensive pow operations... so yeah, it doesn't really matter because of this, but only because of this.
the big problem with ezquake's situation is that time spent processing gamma is time spent before the driver can do its buffer swap, and is thus extra latency.
its hard to please a quakeworld player.