Atmospheric Rain Demo

This demo is a stress test of the paintWorklet when painting a larger number of instances. <ui-rain> creates 100 instances of <ui-droplet> which are driven by updating the --time CSS variable. Each instance is created with a unique --start-offset and --droplet-speed setting which does not change.

100 instances works well, but I did see the performance impacted enough to start dropping frames at this point. The compute time is a very small fraction of the frame budget, but there are 4 sequential GPU calls of ~2ms which makes up roughly half of the ~16ms frame. My guess is that since I'm drawing to a significant portion of the frame with semi-transparent objects, this is a case where compositing becomes the bottleneck?

Profiling dropped frames Profiling dropped frames