- Home /
Universal Render Pipeline - increase number of dynamic lights on a single object?
In the universal render pipeline, as far as I can tell, I can only have 4 spotlights shining on an object at once. Anything past that doesn't show up. Does anyone know how to increase this number?
picture: https://prnt.sc/101hhfh
Answer by Namey5 · Feb 20, 2021 at 07:39 AM
At a guess I would say no (at least not trivially). A key difference between URP and the built in pipeline is in how they handle lighting - as a very simplified explanation, the built in pipeline dynamically renders lights one-at-a-time for each object, allowing for theoretically infinite amounts of per-pixel lights per-object. This method doesn't scale particularly well performance wise, especially now that modern GPUs allow for other grouped lighting methods in realtime. URP renders all lights for an object at once, which is significantly faster but has the downside of only allowing a fixed maximum number of lights that can affect a single object. In theory you can increase this number, but the amount of instances and edge cases you would need to consider to do so makes it a fairly difficult task (especially with how sparse documentation is for the SRPs).
Answer by heyo2022 · Feb 20, 2021 at 07:33 PM
Very interesting! Thank you for your response. I actually did find how to do it, the URP asset lets you change the maximum number of lights (it supports up to 8).
Your answer
Follow this Question
Related Questions
Spot Light passing through walls when close it it 1 Answer
Hybrid Renderer Visual Bug (FPS Drop?) 0 Answers
How to get surface shaders to work in URP? 2 Answers
Light Weight render Pipeline error 0 Answers