/tg/ Station 13 - Modules - Types

code/_onclick/hud/rendering/render_plate.dm

Custom rendering solution to allow for advanced effects We (ab)use plane masters and render source/target to cheaply render 2+ planes as 1 if you want to read more read the _render_readme.md

/atom/movable/render_plane_relayRender relay object assigned to a plane master to be able to relay it's render onto other planes that are not it's own
/atom/movable/screen/plane_master/rendering_plate
/atom/movable/screen/plane_master/rendering_plate/masterthis plate renders the final screen to show to the player
/atom/movable/screen/plane_master/rendering_plate/game_platerenders general in charachter game objects
/atom/movable/screen/plane_master/rendering_plate/unmasked_game_platerenders the parts of the plate unmasked by fov
/atom/movable/screen/plane_master/rendering_plate/masked_game_platerenders the parts of the plate masked by fov
/atom/movable/screen/plane_master/rendering_plate/game_worldContains most things in the game world
/atom/movable/screen/plane_master/rendering_plate/lightingContains all lighting objects

This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.

Emissive overlays are pasted with an atom color that converts them to be entirely some specific color. Emissive blockers are pasted with an atom color that converts them to be entirely some different color. Emissive overlays and emissive blockers are put onto the same plane. The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects. A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is. This is then used to alpha mask the lighting plane.

/atom/movable/screen/plane_master/rendering_plate/non_gamerender plate for OOC stuff like ghosts, hud-screen effects, etc