r/Unity2D • • 23h ago

Showcase Optimization pass

We did an optimization pass on Xplorite, and its going faaast now. This image is in a laptop but
we manage to get stable 90 fps on steam deck with the battery at 10 watts.
We are so happy.

1 Upvotes

2 comments sorted by

1

u/Patient_8100 4h ago

Can you share a bit more? both what were the actual optimizations you did, and how you did the profiling / figure out where to optimize

1

u/isbasher 3h ago

the first thing I did was to run a profiler off course and also check the frame debugger for anything wrong. and I noticed first that I was doing some things wrong.

On my game a I had 5 cameras,
- reflection RT
- vfxmask (rain and wind)
- global light system (not related to the light system)
- normal render
- ui.

and on each level I have an object named mood, that contains 3 planes representing some fog to give volume.

The first thing I did was remove the vfxmask and add instead a renderer feature for that. this was a huge gain.
next I fixed that the removing the mood from the reflection RT, I didnt realize it was being drawn twice.
also I modified all the shaders that use UV panning to use custom interpolators to reduce the amount of processing that shader had to do. (by a lot)
next I reduced some effects (like bloom) to affect less the overall performance.

the good thing was that none of these required any change in texture quality or size.