Fog
NEWc = Sc * Sf + Dc * Df (rdy on 2nd clock)
Dz, Dc = ReadFramebuffer(address) (read on 1st clock)
Sc = Sc * FogFactor + FogColor * (1-FogFactor)
If ((Zflag and Aflag and Sflag) = TRUE) then
WriteFramebuffer(address, NewC) (write on 2nd clock)
address, Sc, Sz, Aflag, Sflag, FogFactor
address, Sc, Dc, Dz, Aflag, Sflag
address, NEWc, Zflag, Aflag, Sflag
Address Calculation, Alpha Test, Scissor Test, Fog Blend
Address = X * ScreenWidth + Y
Aflag = AlphaTest(AlphaRef, ScAlpha)
Sflag = (Xmin <= X <= Xmax)
FogFactor = (FogEnd - Sz)/(FogEnd - FogStart)