MotionBlur.IsActive() - GC allocation.

Hi,

I’m using URP 7.4.3 and Unity 2019.4.7. Today I made dev build and the profiler showed this 40B allocation coming from URP each frame. I’m kind of obssesed with unnecessary GC allocs so I deep profiled:

Found motion blur in the package:

I haven’t look any further but looks like some boxing stuff. I found VolumeParameter in the docs and I believe mode should be mode.value, which got rid of the allocs (it’s called twice).

It’d be nice to get rid of these :slight_smile:

3 Likes

This has been annoying me too. Did you submit a bug report? It’s still present in Unity 2020.1.16.

If anyone else got annoyed by this, I recently submitted a bug report and it is now on the issue tracker. Hopefully it will be fixed soon.

1 Like