106 Commits

Author SHA1 Message Date
Pieter-Jan Briers
8c16b4580b Fix render target caching in overlays (#40181)
Many newer overlays use IRenderTextures that are sized to the rendered viewport. This was completely broken, because a single viewport can be rendered on multiple viewports in a single frame.

The end result of this was that in the better case, constant render targets were allocated and freed, which is  extremely inefficient. In the worse case, many of these overlays completely failed to Dispose() their render targets, leading to *extremely* swift VRAM OOMs.

This fixes all the overlays to properly cache resources per viewport. This uses new engine functionality, so it requires engine master.

This is still a pretty lousy way to do GPU resource management but, well, anything better needs a render graph, so...
2025-09-21 17:16:17 +12:00
metalgearsloth
fd52f698c7 Predict PoweredLights (#36541)
* Move PoweredLight to shared

* Predict the rest of the owl

* reacher

* compinit & anim

* Fix names

* Revert this?

* Fix these

* chicken drummies

* deita

* Fix

* review

* fix

* fixes

* fix PVS weirdness

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-11 23:06:28 +02:00
Pieter-Jan Briers
af4ff4e9de Update content to remove redundant Robust math types (#38930)
Vector3, Vector4, Matrix4, and Quaternion are now gone. This switches us over to System.Numerics where applicable.
2025-07-22 12:29:17 +02:00
Leon Friedrich
f915157b96 Fix yaml linter and misc errors (#37444)
* Fix yaml linter

* Revert "fix cluwne pda pen slot (#35611)"

This reverts commit 66e926843f.

* More fixes

* Try again with the engine requirement removed

* Decrease number of brass sheets dropped by clockwork windoors

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-07-10 00:25:36 -04:00
Tayrtahn
9186b65b14 Validate ShaderPrototype IDs (#38728)
* Convert all shader prototype string literals to protoids in overlays

* Convert more shader prototype literal strings to protoids

* Convert ValidatePrototypeId to ProtoId

* Later
2025-07-03 18:11:31 -07:00
Tayrtahn
75db49f9c0 Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
Perry Fraser
9529cdfa2e fix: correct wall AO having weird sharp edges (macOS only?) (#38552) 2025-06-24 22:39:18 +02:00
metalgearsloth
4f42564265 Fix IsSpace call (#38548) 2025-06-24 12:48:29 +02:00
metalgearsloth
60341cb245 Add wall-based ambient occlusion (#38276)
* Add wall ambient occlusion

* wawawewa

* Work

* cvars

* Comment to make slart happy
2025-06-24 17:56:14 +10:00
Centronias
9053c9692f Decouple Lights from Toggleable Visuals (and headphone music notes bugfix) (#35341)
* - Combine enum keys `ToggleableLightVisuals` and `ToggleVisuals` into `ToggleableVisuals`
- Rename `ToggleableLightVisualsComponent` to `ToggleableVisualsComponent` and `ToggleableLightVisualsSystem` to `ToggleableVisualsSystem`
  - (The `SpriteLayer` field on the component is now required because the old default of `light` doesn't make sense anymore)
- Make it so that `ToggleableVisualsComponent` works even when there's not a light attached to the entity
  - (Amazingly this seems to have only applied to  Headphones, but I can only imagine there are many other things people would like to do with simple toggleable visuals)
- Explicitly make `ItemTogglePointLightComponent`'s purpose to make `ToggleVisualsComponent` apply to `PointLightComponent`s on the same entity.
  - Add field `ToggleableVisualsColorModulatesLights`, which makes the `Color` appearance value of `ToggleableVisuals` modulate the color of lights on the same entity
  - Lots of prototype updates to uptake the above

* fix bad merge

* unbork robust

* blindly letting rider reformat stuff

* I guess I never cleaned up these imports at all
2025-05-30 19:53:56 -04:00
Tayrtahn
bd6645b021 Cleanup redundant SpriteSystem dependencies in VisualizerSystems (#37758)
Cleanup redundant SpriteSystem dependencies in VisualizerSystems
2025-05-23 14:12:20 -04:00
metalgearsloth
fc5c63ac09 Add ImplicitRoofComponent (#36112)
* Add ImplicitRoofComponent

So shuttles get marked as rooved.

* Early-out

So the new render doesn't suck up perf unnecessarily.
2025-05-18 17:47:35 +10:00
Tayrtahn
33f111c090 Cleanup more SpriteComponent warnings (part 2) (#37522)
* Cleanup warnings in DamageMarkerSystem

* Cleanup warnings in CuffableSystem

* Cleanup warnings in DeployableTurretSystem

* Cleanup warnings in StorageContainerVisualsSystem

* Cleanup warnings in ItemMapperSystem

* Cleanup warnings in ItemCounterSystem

* Cleanup warnings in RandomSpriteSystem

* Cleanup warnings in PowerCellSystem

* Cleanup warnings in ParticleAcceleratorPartVisualizerSystem

* Cleanup warnings in PaperVisualizerSystem

* Cleanup warnings in PoweredLightVisualizerSystem

* Cleanup warnings in LightBulbSystem

* Cleanup warnings in EmergencyLightSystem

* Cleanup warnings in DoorSystem

* Cleanup warnings in ClockSystem

* Cleanup warnings in BuckleSystem

* Cleanup warnings in JukeboxSystem
2025-05-17 13:02:36 +10:00
Tayrtahn
9e000fa5cd Cleanup warnings in RgbLightControllerSystem (#37458)
Cleanup warnings in RgbLightControllerSystem
2025-05-15 00:01:54 +02:00
Tayrtahn
6218ab70a8 Cleanup warnings in ExpendableLightSystem (#37415)
Cleanup warnings in ExpendableLightSystem
2025-05-13 11:41:18 -04:00
J
3c3cf1d867 Light warnings cleanup (#36195)
* Light warnings cleanup

* Using EntitySystem Proxy overrides

* New TryComp guards for light animations

* Reverting guards when not wanted
2025-03-31 20:25:00 +02:00
metalgearsloth
70fca49063 Tweak sun shadow rotations (#35758)
Won't use the entity's rotation for the matrix, I just forgot to do this. Means shadows will always point in the same direction and the points will correctly adjust as the entity rotates.
2025-03-10 15:38:33 +11:00
metalgearsloth
b8b6634c0f Fix sun shadows in ANGLE (#35757)
I think I fat-fingered a ctrl-Z on this at some point but the intermediate blur is necessary.
2025-03-10 15:17:53 +11:00
metalgearsloth
f51b9bc86e Add sun shadows (planet lighting stage 2) (#35145)
* Implements a Dynamic Lighting System on maps.

* Edit: the night should be a little bit brighter and blue now.

* Major edit: everything must be done on the client side now, with certain datafield replicated.
Changes were outlined in the salvage to accommodate the new lighting system.

* Edit: The offset is now serverside, this makes the time accurate in all situations.

* Removing ununsed import

* Minor tweaks

* Tweak in time precision

* Minor tweak + Unused import removed

* Edit: apparently RealTime is better for what I'm looking for

* Fix: Now the time is calculated correctly.

* Minor tweaks

* Adds condition for when the light should be updated

* Add planet lighting

* she

* close-ish

* c

* bittersweat

* Fixes

* Revert "Merge branch '22719' into 2024-09-29-planet-lighting"

This reverts commit 9f2785bb16aee47d794aa3eed8ae15004f97fc35, reversing
changes made to 19649c07a5fb625423e08fc18d91c9cb101daa86.

* Europa and day-night

* weh

* rooves working

* Clean

* Remove Europa

* Fixes

* fix

* Update

* Fix caves

* Update for engine

* Add sun shadows (planet lighting v2)

For now mostly targeting walls and having the shadows change over time. Got the basic proof-of-concept working just needs a hell of a lot of polish.

* Documentation

* a

* Fixes

* Move blur to an overlay

* Slughands

* Fixes

* Apply RoofOverlay per-grid not per-map

* Fix light render scales

* sangas

* Juice it a bit

* Better angle

* Fixes

* Add color support

* Rounding bandaid

* Wehs

* Better

* Remember I forgot to do this when writing docs

---------

Co-authored-by: DoutorWhite <thedoctorwhite@gmail.com>
2025-03-08 16:07:42 +11:00
pathetic meowmeow
fabfdd0673 Refactor audio system to send collection IDs over the network (#33610) 2025-02-23 23:14:56 +11:00
metalgearsloth
a457551108 Roof data rework (#35388) 2025-02-23 18:23:00 +11:00
metalgearsloth
bc3517f848 Uncomment blur (#35213)
Was used for debug but stable now.
2025-02-17 02:35:24 +11:00
metalgearsloth
ead32b5770 Apply RoofOverlay per-grid not per-map + fix lighting quality (#35207)
* Apply RoofOverlay per-grid not per-map

* Fix light render scales
2025-02-16 16:29:03 +03:00
metalgearsloth
b6ee183dc6 Add planet lighting (#32522)
* Implements a Dynamic Lighting System on maps.

* Edit: the night should be a little bit brighter and blue now.

* Major edit: everything must be done on the client side now, with certain datafield replicated.
Changes were outlined in the salvage to accommodate the new lighting system.

* Edit: The offset is now serverside, this makes the time accurate in all situations.

* Removing ununsed import

* Minor tweaks

* Tweak in time precision

* Minor tweak + Unused import removed

* Edit: apparently RealTime is better for what I'm looking for

* Fix: Now the time is calculated correctly.

* Minor tweaks

* Adds condition for when the light should be updated

* Add planet lighting

* she

* close-ish

* c

* bittersweat

* Fixes

* Revert "Merge branch '22719' into 2024-09-29-planet-lighting"

This reverts commit 9f2785bb16aee47d794aa3eed8ae15004f97fc35, reversing
changes made to 19649c07a5fb625423e08fc18d91c9cb101daa86.

* Europa and day-night

* weh

* rooves working

* Clean

* Remove Europa

* Fixes

* fix

* Update

* Fix caves

* Update for engine

* Add sun shadows (planet lighting v2)

For now mostly targeting walls and having the shadows change over time. Got the basic proof-of-concept working just needs a hell of a lot of polish.

* Documentation

* a

* Fixes

* Move blur to an overlay

* Slughands

* Fixes

* Remove v2 work

* Finalise

---------

Co-authored-by: DoutorWhite <thedoctorwhite@gmail.com>
2025-02-16 19:35:32 +11:00
beck-thompson
a790955b76 Light verb is now predicted (#33622)
Fix
2024-11-29 00:41:01 +11:00
Mervill
3414abb970 Remove unused IoC dependency references. (#31704)
Remove unused IoC dependencies
2024-09-01 23:22:50 +02:00
Mervill
32e315c68f Refactor LightBehaviorSystem to remove obsolete code (#30890) 2024-08-11 11:45:37 +10:00
Pieter-Jan Briers
8d015f5c9f Fix animation looping bugs. (#29457)
Summary of the problem is in the corresponding engine commit: a4ea5a4620

This commit requires engine master right now.

I think #29144 is probably the most severe one, but I touched Jittering and RotatingLight too since they seemed sus too.

Fixes #29144

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-07-04 18:02:43 +10:00
Leon Friedrich
7ef7fe6761 Try fix RGBee (#28741) 2024-06-08 20:27:21 +10:00
T-Stalker
d9d36b050a Makes flares quieter (#27521)
* light

* flares quieter
2024-04-30 16:49:35 +10:00
LordCarve
aafe815122 Obsolete Logger cleanup for EntitySystems (#25941)
* Small obsolete Logger cleanup

* Fixed three EntitySystem logs that weren't doing it right.
2024-03-10 01:15:13 +01:00
Kara
4ab69709fe Powered light sprite glows with color of their pointlight (#24612) 2024-01-27 09:43:45 -08:00
Pieter-Jan Briers
e665c2487e Use item status extension method (#23884)
Just removes some lines of code.
2024-01-11 19:14:13 -05:00
deathride58
1a531342c5 Glowy lights - light fixtures now actually glow (#23428)
* glowy lights - makes light fixtures actually physically glow when active

* serviced the lights

* ya sure
2024-01-03 19:46:11 +11:00
metalgearsloth
269c93245d Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:34 +11:00
metalgearsloth
5b8f3c48c4 Revert "Update submodule to 175.0.0 (#21318)" (#21319) 2023-10-29 15:29:30 +11:00
metalgearsloth
9b1b3e03ed Content audio (#20862) 2023-10-29 14:58:23 +11:00
DrSmugleaf
f560f88eb5 Remove 700 usages of Component.Owner (#21100) 2023-10-19 12:34:31 -07:00
DrSmugleaf
9e1ecdea76 Remove obsolete usages of AnimationPlayerComponent (#20806) 2023-10-14 10:28:06 -07:00
Leon Friedrich
53b4da68fa Fix light animations (#20263) 2023-09-18 03:57:49 +10:00
metalgearsloth
99b77bc2d3 Remove lights compref (#19531) 2023-09-11 19:18:06 +10:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
deltanedas
91cfabd6f6 light refactoring/rework (#19314)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-03 22:31:10 -07:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
metalgearsloth
5dd4169c51 Remove component.Startup calls (#18229) 2023-07-23 16:11:13 +10:00
metalgearsloth
68480af109 Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
Leon Friedrich
7065341171 Avoid RGB controller error spam (#16440) 2023-05-14 16:18:14 -04:00
TemporalOroboros
750032b002 Resolves ExpendableLightVisualizer is Obsolete (#13888) 2023-05-01 11:03:26 -04:00
metalgearsloth
7360ed0a7f Add pointlight to flashbangs (#15785) 2023-04-26 13:51:48 +10:00
TemporalOroboros
6b381f7304 Resolve PoweredLightVisualizer is Obsolete (#13891) 2023-02-16 00:10:41 -04:00