NyxTheShield / TrombLoader

Trombone Champ Custom Chart Loader
Other
73 stars 13 forks source link

Add support for removing all lighting in a scene #23

Closed WWRS closed 1 year ago

WWRS commented 2 years ago

Motivation

It's currently impossible to remove all the lighting in a scene from existing trombackgrounds. This is because the default lighting has two components:

Unfortunately, we can't just package SceneLightingHelper.cs with TrombLoaderBackgroundProject, since while that would get rid of the environmental lighting, it wouldn't be able to get rid of the lone directional light: Since everybody's Starts are called after the scene is loaded, custom lights would get removed by SceneLightingHelper#Start.

As a result, I propose this lighting removal flow: The background creator adds an empty GameObject named RemoveDefaultLights as the third or later of the camera's children. The rest of the flow is normal. If the version of TrombLoader has this patch, the default lighting will be removed by this code. On older versions, the default lights will just not be removed and that's fine.

Changes

Testing