mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 01:46:30 +01:00
Replaces our lighting system with CM's. (#21465)
Depends on #21458. Ports https://github.com/cmss13-devs/cmss13/pull/4229, with the original authors as: - https://github.com/tgstation/TerraGov-Marine-Corps/pull/1964 for the lighting controller (A-lexa) - https://github.com/tgstation/TerraGov-Marine-Corps/pull/4747 and https://github.com/tgstation/TerraGov-Marine-Corps/pull/7263 for the lighting (TiviPlus) - https://github.com/tgstation/tgstation/pull/54520 for the dir lighting component - https://github.com/tgstation/tgstation/pull/75018 for the out of bounds fix in lighting - https://github.com/tgstation/TerraGov-Marine-Corps/pull/6678 for the emissives (TiviPlus) The main driving reason behind this is that current lighting consumes way too much processing power, especially for things like odysseys/away sites where a billion light sources are processing/moving at once and the game slows down to a crawl. Hopefully this improves the situation by a good margin, but we will need some testmerging to confirm that. <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/1059ba2b-c0c5-495a-9c76-2d75d0c42bf2" /> <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/9704b0f6-4cf6-4dfd-a6cb-5702ad07d677" /> - [x] Resolve todos - [x] Look into open space fuckery (border objects) --------- Co-authored-by: Matt Atlas <liermattia@gmail.com> Co-authored-by: JohnWildkins <john.wildkins@gmail.com>
This commit is contained in:
@@ -34,11 +34,13 @@
|
||||
/atom/movable/screen/plane_master/game_world
|
||||
name = "game world plane master"
|
||||
plane = GAME_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_OVERLAY
|
||||
|
||||
/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner)
|
||||
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
|
||||
. = ..()
|
||||
add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10))
|
||||
remove_filter("AO")
|
||||
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
|
||||
|
||||
/atom/movable/screen/plane_master/game_world_above
|
||||
name = "above game world plane master"
|
||||
@@ -96,13 +98,18 @@
|
||||
/atom/movable/screen/plane_master/lighting
|
||||
name = "lighting plane master"
|
||||
plane = LIGHTING_PLANE
|
||||
blend_mode_override = BLEND_MULTIPLY
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
|
||||
/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
|
||||
. = ..()
|
||||
mymob.overlay_fullscreen("lighting_backdrop", /atom/movable/screen/fullscreen/lighting_backdrop/backplane)
|
||||
mymob.overlay_fullscreen("lighting_backdrop_lit_secondary", /atom/movable/screen/fullscreen/lighting_backdrop/lit_secondary)
|
||||
|
||||
/atom/movable/screen/plane_master/lighting/Initialize()
|
||||
. = ..()
|
||||
add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE))
|
||||
|
||||
add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE))
|
||||
/**
|
||||
* Handles emissive overlays and emissive blockers.
|
||||
*/
|
||||
@@ -120,6 +127,8 @@
|
||||
/atom/movable/screen/plane_master/above_lighting
|
||||
name = "above lighting plane master"
|
||||
plane = ABOVE_LIGHTING_PLANE
|
||||
appearance_flags = PLANE_MASTER //should use client color
|
||||
blend_mode = BLEND_OVERLAY
|
||||
render_relay_plane = RENDER_PLANE_GAME
|
||||
|
||||
/atom/movable/screen/plane_master/runechat
|
||||
@@ -134,6 +143,20 @@
|
||||
remove_filter("AO")
|
||||
add_filter("AO", 1, drop_shadow_filter(x = 0, y = -2, size = 4, color = "#04080FAA"))
|
||||
|
||||
/atom/movable/screen/plane_master/o_light_visual
|
||||
name = "overlight light visual plane master"
|
||||
plane = O_LIGHTING_VISUAL_PLANE
|
||||
render_target = O_LIGHTING_VISUAL_RENDER_TARGET
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
blend_mode_override = BLEND_MULTIPLY
|
||||
|
||||
/atom/movable/screen/plane_master/nvg_plane
|
||||
name = "NVG plane"
|
||||
plane = NVG_PLANE
|
||||
render_relay_plane = RENDER_PLANE_GAME
|
||||
blend_mode_override = BLEND_MULTIPLY
|
||||
|
||||
/atom/movable/screen/plane_master/fullscreen
|
||||
name = "fullscreen alert plane"
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
plane = RENDER_PLANE_GAME
|
||||
render_relay_plane = RENDER_PLANE_MASTER
|
||||
|
||||
/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner)
|
||||
. = ..()
|
||||
add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10))
|
||||
|
||||
///render plate for OOC stuff like ghosts, hud-screen effects, etc
|
||||
/atom/movable/screen/plane_master/rendering_plate/non_game
|
||||
name = "non-game rendering plate"
|
||||
|
||||
Reference in New Issue
Block a user