Jump Flood Algorithm Phat outlines.. tweaked by thrax!

https://smooth-road-nerine.glitch.me

11 Likes

Effect is great, performance is terrible! :slight_smile:
Some optimization mmigh be in order…

1 Like

cpu/gpu/os?

I switched to HalfFloat in the rendertarget allocation. Seems to help quite a bit… you mind checking the link and seeing if its any better? (The performance scales with the outline size)

1 Like

Windows, Chrome, Laptop. Xenon 2.8Ghz, 16Mb Nvidia Quadro M4000.
Runs most threejs demos at 60fps.

Perhaps add the stats to you project, so we can read how much memory and speed?

1 Like

Ctrl-Shift-J ---- console-> rendering tab–>Frame Rendering Stats

Yeah… curious if switching to HalfFloat helped your case. The max radius also has a linear effect on GPU load… hmmm… appreciate the feedback…
I’ve only tested on a pixel 6, nv gtx1080 and a rtx4090.

Switching to HalfFloat made it work on iOS :+1:

But I can confirm that performance is not ideal. I am using iPhone 15.

Is it possible to improve that?

It’s pretty close to the limits of what I can see to optimize. If maxradius was limited to 127, could perhaps change the jump flood to store a delta to the nearest pixel… that would cut fill rate in half again at the cost of some complexity in each pass.
One could perhaps also run this on a half res buffer and upscale back to fullscreen… but… I’m losing interest. :smiley: