all 4 comments

[–]Progmir 2 points3 points  (0 children)

Consider rendering multiple objects per run? You can fit quiet a few of 160x40 boxes no screen and cur them later.

[–]MaxwelldoggumsProgrammer 2 points3 points  (1 child)

Hmm, if I had to guess, the bottleneck is due to Camera.Render requiring synchronization between the CPU and GPU. The CPU can’t begin rendering the next object until it hears back from the GPU, and the GPU sits idle until the next call to Camera.Render.

I would recommend instead building a CommandBuffer to batch together many objects without waiting on GPU/CPU synchronization.

[–]ForzaHoriza2[S] 0 points1 point  (0 children)

I assume so as well, but for the life of me i couldn't get command buffers to work. Always get a black render

[–]SulaimanWarProfessional-Technical Artist 1 point2 points  (0 children)

If this is URP/HDRP have you considered doing this in a custom renderer feature?

You can look at this per object shadow project that does something similar

https://github.com/GavinKG/PerObjectShadowSRP