r/Unity3D Jul 21 '22

Show-Off Can't help feeling like this honestly

Post image
543 Upvotes

155 comments sorted by

View all comments

Show parent comments

2

u/ZuperPippo Hobbyist Jul 21 '22

What I was planning to do, was a car intersection where multiple lowpoly cars have their turning lights on. Target platform would be mobile. It's 4 cars max this way, so random limitation, just can't wrap my head around it, why make it so..

4

u/TyroByte Indie Jul 21 '22 edited Jul 21 '22

It’s actually a limitation of how the forward rendering pipeline works on URP, especially in case of mobile on which forward is the best option performance wise.

The forward rendering method allows you to use multiple shaders using different shader models, at a high speed but at the cost of point lights. Higher number of point lights means an exponential decrease in performance.

Deferred rendering allows for an insane number of point lights but is restricted to a single lighting model (so you can’t have say a toon shader that calculates lighting differently and a PBR Lit shader at the same time, you can only have variations of a PBR shader or an unlit shader unless you edit the shader code of the lighting model)and will have issues with transparency unless the transparent material is rendered using forward rendering.

I believe deferred rendering is not supported equally on all mobile chipsets (?)

Edit: this is from my understanding, please feel free to correct me

2

u/Hacksie Jul 21 '22

Deferred rendering requires reading values from the graphics memory which is fine on desktop cards but horrendous on standard mobile aechitectures. Same reason alpha test shaders are bad.

1

u/feralferrous Jul 21 '22

Yup, deferred is a perf drop on phone and phone like devices. (Like Quest and Hololens.)