+ if 1 < supersample and
+ run("convert %s -scale %dx%d %s", filename, size.w, size.h, filename) ~= 0 then
+ print()
+ os.exit(1)
+ end
+ end
+end
+
+function renderings()
+ local t = {}
+ for i = 1,jobs do
+ table.insert(t, coroutine.wrap(render))
+ end
+ local iterations = frames + jobs
+ local frame = 0
+ return function()
+ frame = frame + 1
+ if frame <= iterations then
+ local i = frame
+ if frames < i then i = null end
+ return t[1 + frame % jobs], i
+ end