Hello, is there a way use scriptable render loop to use forward lighting with the 4 closest point lights per objects like in the current rendering in Unity? For instance with 4 lights per object:
Instead of being limited to a number of lights globally like the Basic/Lightweight scriptable render pipeline? For instance 4 global lights:
Specifically, I’m looking into implementing single pass forward lighting using the scriptable render loop for low end mobile devices (i.e. IPhone 5). Unity’s built in render pipeline sets shader properties (unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_4LightAtten0, unity_LightColor) and keywords (VERTEXLIGHT_ON) per object based on the closest lights for that object.
However I’m having trouble finding something similar for the current scriptable render loop examples. BasicPipeline & LightweightPipeline both set lighting data globally which causes performance and graphics issues (computing lighting for lights that are too far and being limited to 4 lights in the scene vs 4 lights per object). HDRenderPipeline seems to be using compute shaders for deferred lighting but, as far as I can tell, Unity doesn’t support compute shaders for low end mobile devices and forward is a better option. Is there something I missed in the RenderPipelines that would help me?
Alternatively, is this data related to LightIndices? RenderConfiguration would make sense as a place to enable per object point light properties as it does so for lightprobes, reflectionprobes, lppvs, and lightmaps. RenderConfiguration can also can enable lightIndices so I’m hoping that this is for per object lighting data. CullResults.GetLightIndicesCount also returns a number that depends on the number of objects and point lights in the scene. However if this is setting properties in the shader, what are those properties and how can I access them? The closest thing I could find was CullResults.FillLightIndices(ComputeBuffer computeBuffer) but again, Unity doesn’t support compute shaders for low end mobile devices.
Can you please provide some direction into what to look into?
Edit: Added a details with pictures