Overlay Entity

This is an extension of entities represented by billboards. A nonzero byte overlay parameter in entity_state_t indicates that the image used by this entity is supposed to be rendered after the entire frame is finished, but subject to any full screen blend (pain) or warp (underwater, not yet in OpenGL). Higher values of "overlay" indicate higher priority: 0xFF gets rendered last, 0x01 gets rendered first.


Unified handling: everything visible should be represented as an entity. Power ups and items used that are represented by HUD icons could be handled this way. The separate handling of the HUD would be obsolete.

Additional game effects: lens flares, facehuggers on visor, blood spatters, sparks and spots blinding the player, HUD changes extensions, fake visor reflections could all be implemented like this.


Full screen effects are always a fill rate sink. Full screen images can get really large, or will be fuzzy if magnified and smoothed.


The images might have to be RGBA for simplicity. The entities x and y coordinates could be used for placing in Normalized Device Coordinates (NDC), the z coordinate could be interpreted as uniform scaling. As the costs are negligible with delta compression, separate fields could be added for these for cleaner separation. This way, overlays would not be full screen by default.

Re-uses existing code for HUD icons and billboards. Scaling to full screen, aspect ratio issues, alignment with view VUP need to be done. Overlays are by definition placed close or on the near clipping plane; if several are used, precision issues might crop up.


Full screen blits with locally (PAK) stored data, or server side stuffimage. View aligned billboards with hacked z-depth. Partial implementation was already announced by John Carmack/John Cash: a virtual screen resolution of 640x480

Submitted 980416, revised 980428, comments to Bernd Kreimeier.