summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-02 19:09:34 +0200
committerGitHub <noreply@github.com>2018-10-02 19:09:34 +0200
commit45842c0ea9c6e80f56954efb5e08a7c81e372fc4 (patch)
treec240fe1f8634002f029da7ce66a8e569e531126d /drivers/gles2/shaders
parent051b8837b0298665de7d5e77e49802f0651a9b3f (diff)
parentac2a4771d51a73cb3da2e54af4ef277538b2499a (diff)
Merge pull request #22627 from akien-mga/gles2-pixel-snap
GLES2: Implement pixel snap 2D option
Diffstat (limited to 'drivers/gles2/shaders')
-rw-r--r--drivers/gles2/shaders/canvas.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
index 3db60f7caa..b990384949 100644
--- a/drivers/gles2/shaders/canvas.glsl
+++ b/drivers/gles2/shaders/canvas.glsl
@@ -96,6 +96,10 @@ VERTEX_SHADER_CODE
color_interp = color;
+#ifdef USE_PIXEL_SNAP
+ outvec.xy = floor(outvec + 0.5).xy;
+#endif
+
gl_Position = projection_matrix * outvec;
}