Cardboard engine

From Eternity Wiki
Jump to: navigation, search

Cardboard is the floating-point renderer which debuted in version 3.35.90 of the Eternity Engine. Cardboard was created by programmer Stephen "SoM" McGranahan to address deep-seated problems inherent in the Doom engine's method of projecting and rendering lines and flats.

Advantages of the Cardboard renderer include greatly improved behavior of anisotropic two-sided lines, giving a clean-scaled appearance to textures even when the camera is looking down a line that it is practically on, and even when mlook is engaged to the minimum or maximum of its vertical range. Long wall error is reduced, allowing maps to contain much longer linedefs without numeric instability causing the walls to appear to "wobble". Behavior of the engine with respect to extreme height differences is also improved, retaining earlier repairs of crashes and eliminating most remaining rendering glitches associated with tall areas. Rendering of flats is now pixel-perfect in most circumstances.

Cardboard also includes optimizations. Flat drawing has been sped up significantly, and two-sided lines have also been improved via tweaks to the main seg-drawing loop and the ability to treat closed lines as one-sided for rendering purposes.

Unlike previous attempts by the Boom team and other source ports, Cardboard manages to allow the game engine to retain full compatibility by creating an optimum interface between fixed-point level geometry and the floating-point renderer. For example, floating-point vertex coordinates and sector heights are cached on a per-frame basis, minimizing integer-to-float conversions. As a result, frame rates under Cardboard are in most cases superior to the original renderer.

Cardboard includes some qualities which will improve the ability to later add true color support. It was originally developed outside of the Eternity Engine as a stand-alone program which could draw Doom textures and flats in 32-bit color with dynamically calculated light fading.

Back to Eternity Engine

Enhancements provided[edit]

  • 2S lines remain firmly in place even when the player is directly above them and between the two vertices. No more "wobbly" lines.
  • Long wall error is drastically reduced.
  • 2S line texturing remains stable even with the player's view point inside the texture.
  • Artificial limitations on area height are completely removed.
  • Flat rendering accuracy is greatly improved; visplanes no longer dance when light levels change, and flats line up perfectly with wall textures.
  • No more "sparklies" at the bottom of line textures.
  • Speed improvements.