Skip to content

Commit

Permalink
tests: fix pixel coordinate test using too low precision in opengl es
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Mar 23, 2024
1 parent 1e657ea commit 112270b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testing/tests/graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
]]
Expand Down

0 comments on commit 112270b

Please sign in to comment.