Thanks! I’ll give it a try. Up to this point I’ve been using “Fire on Display Refresh” as recommended in the “Make Image with Shadertoy” node documentation.
Test 1 - try “time” first
I figured I’d go ahead and test all the timing options, starting with the default “time” input from the Image Generator protocol. When playing in the Vuo Composition Loader in full screen mode, it performs about the same as fire on display refresh. Some problematic frame dropping in fullscreen, not as bad in a windowed view.
However, using the “time” input and exporting it as a screensaver boosts performance when compared to display refresh (which practically dies when used in a screensaver), up to the same levels as the Vuo Composition Loader in full screen mode (albeit still not reaching Quartz performance levels). It appears “Fire on Display Refresh” really isn’t happy when embedded as a screensaver.
And that’s all rendering at retina resolution (sorta; it’s set to 1.5x since I’m on a Mac Pro with dual 24" 4k displays). Curiously, using “time” in conjunction with the half-resolution-then-scale-back-up technique described in a previous post actually kills screensaver performance again. Completely unusable frame rate, super jerky.
At which point I realised this was going to require documentation with a lot more detail…
Test 2 - test everything over again from scratch
Of note: performance in the Vuo Composition Loader was tested both in a window scaled to fill the entire screen (minus the dock/menubar), and in fullscreen mode, which uses the newer MacOS fullscreen setup (where takes over both monitors and leaves one of them blank, very frustrating). Performance is consistently better in windowed mode. However, Quartz Composer suffers no such performance hit: windowed mode and fullscreen mode are identical, however it’s not the “new” fullscreen - it simply fills one monitor, and the second monitor is fully usable (oh how I long for the old days of MacOS supporting dual monitors nicely without using them as separate spaces, sigh).
-
Quartz: perfect performance in all situations
-
Display Refresh: not compatible with screensavers
-
Time: much better, not perfect
-
Periodically 0.0166… (~60fps): worse again
-
Periodically 0.0333… (~30fps): minimal improvement
…and also…
-
Half-res (tested individually with each of the above except for Quartz): seems to make no difference in screensaver mode
Also note: dividing the resolution by half doesn’t actually match my monitor scaling factor, so it’s both significantly lower performance and noticeably lower quality than Quartz, which renders at a somewhat higher resolution (my monitors are set to 1.5x scale, so quartz would be rendering at 66.6666% of full resolution instead of 50%).
Attached you’ll find the spreadsheet of results. The percentages are simply my subjective evaluation of performance, with anything under 95% being (in my opinion) unreliable, and anything under 90% being unusable (noticeably jerky or low framerate). Unfortunately, limiting the frame rate by using a “Fire Periodically” node doesn’t appear to improve performance at all, and in some cases, actually makes it worse. Is there another, more correct way to limit frame rate?
And just for reference, here’s the node graph in Vuo:
- Yellow = GLSL shader (almost exactly the same as what I’m using in Quartz, but with none of the exposed controls)
- Green = Timing (this input is what I was testing with different firing options, not pictured here) (the add node combines the time input with a random number so each monitor displays a different pattern…I didn’t have the Allow First Event hooked up to the Make Random Value node, so it wasn’t working for my initial tests and this screenshot, whoops! Fixed now, working as expected)
- Blue = Image loading (four different 4k textures, same ones I’m using in Quartz)
- Orange = Resolution scaling (hooked up to a boolean so I can toggle it on and off for testing…based on the results above, it really needs to stay off for anything used as a screensaver!)