From 112270ba1903bcb47502dec04f497696273c1adc Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Sat, 23 Mar 2024 00:19:47 -0300 Subject: [PATCH] tests: fix pixel coordinate test using too low precision in opengl es --- testing/tests/graphics.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/tests/graphics.lua b/testing/tests/graphics.lua index acbf74087..1993b0bab 100644 --- a/testing/tests/graphics.lua +++ b/testing/tests/graphics.lua @@ -211,8 +211,8 @@ 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 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; + highp vec2 value = pc / love_ScreenSize.xy; + highp vec2 quantized = (floor(255.0 * value + 0.5) + 0.1) / 255.0; return vec4(quantized, 0.0, 1.0); } ]]