Facepunch / sbox-issues

175 stars 12 forks source link

The addition of Light Layers or a tags-based include/exclude system for Scene Lights. #5054

Open rbwldrf opened 7 months ago

rbwldrf commented 7 months ago

For?

S&Box

What can't you do?

So, basically I'm making a minigame within a game I'm prototyping, where the main game is a galaxy-scale space sim, and the minigame that's played on a Render Texture within the main game is a collection of various different games, and seeing as I don't want the two to intersect, I have decided to split the two up between tags, and while the Camera renders selectively based on the tags it's told to render alright, the lights seem to affect all objects with no option to change it.

How would you like it to work?

Similarly to the way it works on the Camera component, I want lights to either:

  1. Include the option to choose which objects they're supposed to affect or not based on the tags those objects are given.
  2. Have the ability to separate lights into different layers so specific objects can be told by which light layers they should be affected.

What have you tried?

I've tried making a shader to help with this, but I haven't been able to get it working yet, so I've just decided to have the minigames be unlit for now.

Additional context

I think this is a fairly significant feature to have in 3D art, and I think the engine would benefit greatly from having this feature, at least in terms of artistic expression.

handsomematt commented 7 months ago

Scene lights should be made to use render tags same as any other scene object