diff --git a/test/integration/cpu-render.html b/test/integration/cpu-render.html
index 468601c33..0cc5b7d69 100644
--- a/test/integration/cpu-render.html
+++ b/test/integration/cpu-render.html
@@ -53,10 +53,15 @@
return { id, drawable };
}).filter(Boolean);
const color = new Uint8ClampedArray(3);
- for (let x = -239; x <= 240; x++) {
- for (let y = -180; y< 180; y++) {
- render.constructor.sampleColor3b([x, y], drawBits, color);
- const offset = (((179-y) * 480) + 239 + x) * 4
+ const vec = [0, 0];
+ for (let x = 0; x < 480; x++) {
+ // leftmost pixel is -240, rightmost is 239
+ vec[0] = x - 240;
+ for (let y = 0; y < 360; y++) {
+ // bottommost pixel is -179, topmost is 180
+ vec[1] = 180 - y;
+ render.constructor.sampleColor3b(vec, drawBits, color);
+ const offset = ((y * 480) + x) * 4;
cpuImageData.data.set(color, offset);
}
}