double[] samples = scene.getSampleBuffer();
final Camera cam = scene.camera();
long jobStart = System.nanoTime();
if (scene.pathTrace()) {
// this is intentionally incorrectly indented for readability
for (int y = y0; y < y1; ++y) {
int offset = y * width * 3 + x0 * 3;
for (int x = x0; x < x1; ++x) {