[gtk/wip/master.win.egl: 8/9] demos: Fix glarea demo on OpenGL/ES
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/master.win.egl: 8/9] demos: Fix glarea demo on OpenGL/ES
- Date: Fri, 22 Nov 2019 16:27:50 +0000 (UTC)
commit 98c3162f494ea1b990ee0e150f5bbe36d4a64638
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Aug 3 15:54:48 2018 +0800
demos: Fix glarea demo on OpenGL/ES
Some implementations of the ES 1.00 shader (such as Google's ANGLE) do
not like the 'f' suffix for floats, so just drop it, as it should be
harmless to drop.
demos/gtk-demo/glarea-gles.fs.glsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/glarea-gles.fs.glsl b/demos/gtk-demo/glarea-gles.fs.glsl
index 39f7143960..ac5e195031 100644
--- a/demos/gtk-demo/glarea-gles.fs.glsl
+++ b/demos/gtk-demo/glarea-gles.fs.glsl
@@ -1,7 +1,7 @@
precision highp float;
void main() {
- float lerpVal = gl_FragCoord.y / 500.0f;
+ float lerpVal = gl_FragCoord.y / 500.0;
- gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
+ gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]