Hello Everyone
I am porting my project from Unity 2022.3 to Unity 6. I noticed that ScriptableRenderContext.DrawRenderers()
is now deprecated and that I am expected to use render lists instead. Problem is I found very little documentations about render list. All I found is the API reference but nothing explaining what they are, how they work and how to best use them.
All I know so far is that instead of doing
context.DrawRenderers(cullResults, ref drawingSettings, ref filterSettings);
I should do
var renderListParam = new RendererListParams(cullResults, drawingSettings, filterSettings);
var renderListHandle = context.CreateRendererList(ref renderListParam);
mCommandBuffer.DrawRendererList(renderListHandle);
So my questions is: what are the best practices when using render lists?
- Is there a performance impact to creating a render list?
- Does creating a render list takes CPU time?
- Does creating a render list allocate memory on the CPU or GPU?
- Is there something I must do to dispose of a render list when I’m done with it?
- Should I create as few render list as possible?
- Should I reuse render lists between cameras?
- Should I reuse render lists between frames?
Thank you very much.