[gtk+/wip/ebassi/gles: 9/26] glsl: Specify precision for GLES shaders
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/ebassi/gles: 9/26] glsl: Specify precision for GLES shaders
- Date: Sun, 24 Apr 2016 14:09:59 +0000 (UTC)
commit 59cd1c66a8a0ae914a93eab62b4db88af9edc0a6
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Apr 23 10:10:56 2016 +0100
glsl: Specify precision for GLES shaders
We need to override the precision for the UV attribute.
gdk/resources/glsl/gles2-texture.fs.glsl | 4 +++-
gdk/resources/glsl/gles2-texture.vs.glsl | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/resources/glsl/gles2-texture.fs.glsl b/gdk/resources/glsl/gles2-texture.fs.glsl
index a2a0415..68e455f 100644
--- a/gdk/resources/glsl/gles2-texture.fs.glsl
+++ b/gdk/resources/glsl/gles2-texture.fs.glsl
@@ -1,6 +1,8 @@
+precision mediump float;
+
uniform sampler2D map;
-varying vec2 vUv;
+varying highp vec2 vUv;
void main() {
gl_FragColor = texture2D(map, vUv);
diff --git a/gdk/resources/glsl/gles2-texture.vs.glsl b/gdk/resources/glsl/gles2-texture.vs.glsl
index 0625cb3..62fb1c7 100644
--- a/gdk/resources/glsl/gles2-texture.vs.glsl
+++ b/gdk/resources/glsl/gles2-texture.vs.glsl
@@ -1,7 +1,7 @@
attribute vec2 position;
attribute vec2 uv;
-varying vec2 vUv;
+varying highp vec2 vUv;
void main() {
vUv = uv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]