138139140141142143144145146147148
samples[offset+0] = (samples[offset+0] * scene.spp + sr) * sinv; samples[offset+1] = (samples[offset+1] * scene.spp + sg) * sinv; samples[offset+2] = (samples[offset+2] * scene.spp + sb) * sinv; if (scene.finalizeBuffer()) { scene.finalizePixel(x, y); } offset += 3; } }
164165166167168169170171172173174
if (((x+y)%2) == 0) { continue; } } else { if (((x+y)%2) != 0) { scene.finalizePixel(x, y); continue; } } cam.calcViewRay(ray, random,
194195196197198199200201202203204
samples[(y*width+x)*3+0] = ray.color.x; samples[(y*width+x)*3+1] = ray.color.y; samples[(y*width+x)*3+2] = ray.color.z; scene.finalizePixel(x, y); if (firstFrame) { if (y%2 == 0 && x < (width-1)) { // copy forward scene.copyPixel(y*width + x, 1);