jwwalker wrote: ↑Mon Nov 15, 2021 11:12 pm
Thanks for the workaround
It's not a workaround, it's the recommended solution.
jwwalker wrote: ↑Mon Nov 15, 2021 11:12 pm
though it doesn't really answer the "why" for me. I would have bet anything that lighting without shadows would always be an order of magnitude simpler than lighting with shadows.
What you're describing is called simply "Forward" rendering. If you've got a simple scene it's probably the best way to render everything.
But once you have larger scenes you want to have each object to be affected by the least possible number of lights (i.e. culling by distance to each object). This either requires expensive per object light lists (because it grows with N * M, N being the number of objects on the scene and M number of lights) or have all lights visible at all times.
It works for shadow mapping because shadow maps are few and the most expensive part is the shadow map pass, so we simply evaluate lights' proximity to camera and have it enabled for all objects.
But for regular lights, much more efficient algorithms like Forward+ (or Deferred, which we don't implement) are preferred which can deal with large numbers of objects and lights.