-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
What problem does this solve or what need does it fill?
Currently render layers only affect the entity that they are attached to, not their descendants. This is problematic for a number of reasons: for example, if I load a GLTF scene and spawn a SceneBundle
, I can add a render layer to the bundle, but it has no effect on the models contained within the scene. While I can manually iterate through the scene bundle and add RenderLayers
components, this doesn't help if I have multiple instances of the scene which need to appear in different layers.
What solution would you like?
Because inheritance requires additional calculation, I propose adding a new optional component (or perhaps a new property on RenderLayers
) which would cause the layer settings to apply to all descendants, except for descendants which explicitly had their own layer settings. This would operation much like the existing visibility calculations, and probably could be performed in the same tree traversal.
What alternative(s) have you considered?
At the moment I'm manually iterating over descendants and adding render layers, but this adds a lot of extra complexity.