From efaa5aa17a8f04c0a551b500c7b018b8ef8e997b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 13 May 2018 03:31:24 +0900 Subject: [PATCH] graphics: Refactor shader --- internal/graphics/shader.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/graphics/shader.go b/internal/graphics/shader.go index bba039e24..a4e4b0cd8 100644 --- a/internal/graphics/shader.go +++ b/internal/graphics/shader.go @@ -90,9 +90,7 @@ highp vec2 roundTexel(highp vec2 p) { // highp (relative) precision is 2^(-16) in the spec. // The minimum value for a denominator is half of 65536. highp float factor = 1.0 / 32768.0; - p.x -= mod(p.x + factor * 0.5, factor) - factor * 0.5; - p.y -= mod(p.y + factor * 0.5, factor) - factor * 0.5; - return p; + return p - (mod(p.x + factor * 0.5, factor) - factor * 0.5); } void main(void) {