Anyone remember the old-school 8-bit fading routines? (like in doom and prince of persia)
anyone have efficient (heck, even working) routines for this effect?
I figured maybe using the rgb bias or somesuch, but i’m not sure it would work.
For static scenes, alpha blending works by just rendering the scene and using the completed render as a bitmap and sweeping alpha from 0 to 1 on a black background, but there has to be some way to implement it on a dynamic 3d scene.
any help would be nice, no code though,just concepts. I don’t wanna spunge anyone else’s code.
During a fade out , is maximum framerate really important? I don’t think so. But as far as that goes, you’d could also twiddle the hardware gamma ramps to do a fade.
[This message has been edited by DFrey (edited 10-22-2000).]
for (int i = 0; i < 3; i++)
{
int min = 256 * i;
int max = min + 256;
for (int j = min; j < max; j++)
NewRamp[j] = pow(((j % 256) / 256.0), 1/gammacorrection) * 65536;
}
SetDeviceGammaRamp(WinData.hDC, NewRamp);
Hmm, I have no idea how to adjust the gamma ramps on anything other than Windows. And yes, only relatively modern cards may likely support gamma ramps. Also, for obvious reasons, I wouldn’t want to do this if the app was windowed. The easiest cross platform method of fading is simply drawing the viewport covering quad with time varying alpha.
anyone have any ideas if the bias functions would have any effect?
are they only good for the actual pixel transfers, like they wouldn’t affect the rendering other than when the texture is applied in the beginning (i.e. won’d even touch the un-textured polys)
i do what DFrey saiz a big polygon across the screen and adjust the alpha component which is acceptable even in 16bit colour.
about the gamma, on me win2000
SetDeviceGammaRamp(…) seems to work randomly ie about 20% of the time, i havent been able to figure this one out though i cant say ive tried to hard .
one think i noticed recently in the quake3 log was “ext_gamma_control 1” what extension is this its not in the sgi registry