diff --git a/testing/output/expected/love.test.graphics.Canvas-4.png b/testing/output/expected/love.test.graphics.Canvas-4.png index 9dbe75c20..2fbfe6fb1 100644 Binary files a/testing/output/expected/love.test.graphics.Canvas-4.png and b/testing/output/expected/love.test.graphics.Canvas-4.png differ diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index f4d0519fc..49f3ef40c 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -211,7 +211,7 @@ love.test.graphics.Canvas = function(test) vec4 effect(vec4 c, Image tex, vec2 tc, vec2 pc) { // rounding during quantization from float to unorm8 doesn't seem to be // totally consistent across devices, lets do it ourselves. - vec2 value = pc / love_ScreenSize.xy; + vec2 value = floor(pc) / love_ScreenSize.xy; vec2 quantized = (floor(255.0 * value + 0.5) + 0.25) / 255.0; return vec4(quantized, 0.0, 1.0); } @@ -232,6 +232,7 @@ love.test.graphics.Canvas = function(test) love.graphics.draw(img, 0, 0, 0, canvas:getDimensions()) love.graphics.pop() local imgdata4 = love.graphics.readbackTexture(canvas) + -- test:exportImg(imgdata4, 4) test:compareImg(imgdata4)