FirstPersonKSP / RasterPropMonitor

Plugin for Kerbal Space Program
https://forum.kerbalspaceprogram.com/index.php?/topic/190737-18x-rasterpropmonitor-adopted/&tab=comments#comment-3723047
Other
24 stars 13 forks source link

Create a way to batch props #98

Closed JonnyOThan closed 1 year ago

JonnyOThan commented 1 year ago

There are huge numbers of PanelDivider props in a lot of ASET-based cockpits. There's no reason these need to be separate; ideally they'd be a single prop that either uses static batching or instancing to draw.

Ideally this could also be used to batch parts of props that are static or have similar behaviors, e.g. the borders around buttons or text meshes that respond to backlights in the same way. It should also affect stock props; often there are many placements of the same props in a single IVA.

This should improve CPU and GPU performance, because props and prop modules could be removed if they're all handled by a single module.

JonnyOThan commented 1 year ago

Proposal: a batching module that gets added to the INTERNAL node. In its OnLoad function it can walk the list of props and the internal model and modify them as necessary. There could be a global config file somewhere that indicated which transforms on which props can be batched.