summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-10-02 15:53:24 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-10-02 15:53:24 +0200
commitac2a4771d51a73cb3da2e54af4ef277538b2499a (patch)
tree6267e4bd7f8ff9221524da4bbf4e128371b8388d /drivers/gles2/shaders
parent9c93a401b9aadbc34354cc0246b90b7afa98f47c (diff)
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;
}