Home Creators Posts Import Register Favorites Logout

Content

The impact of the fog on the framerate was reduced from 20% to 11%. There's nothing else to optimize in it; I even integrated it directly in the video flipping loop, so it's drawn directly to the video memory.

Well, it's fully computed per-pixel, so maybe I could compute it every 4 columns instead. But such an approach could result in significant visual artifacts, specially on surfaces with alphamasked textures.

Optimizing it made me realize that the opaque BSP surface rasterization can likely be optimized a little more, so I'll try that later.

The fog is also rendered in Quadricolor now. As you can see in this screenshot, it's quite smooth. Depth dithering was not implemented in this fog rendering algorithm due to performance reasons, but if I figure out a way to precompute the depth dithering with zero impact on realtime performance, I'll do it.

Fog rendering still needs to be integrated with the underwater warp into a new underwater warping function, since the underwater warp also has the video flipping loop integrated into it.

Afterwards, the color shading map generator will have to be modified a little to work properly with fog parameters so we can have colored fog. Fog intensity will also be fully defined by its color shading map tables, so identical fog colors with different intensities will require different tables.

The final step will be implementing console commands/cvars and map entity support for fog activation.

Files

Comments

No comments found for this post.