NyxTheShield / TrombLoader

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

Add shadows #25

Closed WWRS closed 1 year ago

WWRS commented 1 year ago

Motivation

By default, shadows are totally disabled. I wanted to keep this the case, but add the ability for trombackgrounds to enable them at will.

Since shadow settings are persistent, this means toggling them off, then checking if the trombackground wants to toggle them on.

I used the same technique for opting into shadows as opting out of the lighting system: An object after foreground and background named "AddShadows" will enable shadows.

Changes

Testing

I created two test scenes, one with shadows and one without. They're otherwise identical, with a light that should cast a shadow on the scene with shadows enabled. On the scene with shadows disabled, the same setup should cast no light.

  1. Check the scene with shadows disabled: no shadows appear
  2. Check the scene with shadows enabled: shadows appear
  3. Without closing the game, check the scene with shadows disabled again: no shadows appear