diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-09-23 17:38:03 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-09-29 09:51:16 +0200 |
commit | 16cdb33c6c17615efaa57fd04e2ac14180bf68fa (patch) | |
tree | 286d438a4f6ee5e9f0f7b2f5a2c16c7c6aca280c /demos | |
parent | bacb3affb34cef7f29152849feddaffaa06433a7 (diff) | |
download | gtk+-16cdb33c6c17615efaa57fd04e2ac14180bf68fa.tar.gz |
shadertoy demo: Fix GLSL on GLES
I was getting "assignment to varying fragColor" errors
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/gtkshadertoy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/gtk-demo/gtkshadertoy.c b/demos/gtk-demo/gtkshadertoy.c index 866bd69481..7d8c4926f6 100644 --- a/demos/gtk-demo/gtkshadertoy.c +++ b/demos/gtk-demo/gtkshadertoy.c @@ -56,13 +56,15 @@ const char *fragment_prefix = "uniform float iSampleRate; // sound sample rate (i.e., 44100)\n" "\n" "in vec2 fragCoord;\n" - "out vec4 fragColor;\n"; + "out vec4 vFragColor;\n"; // Fragment shader suffix const char *fragment_suffix = " void main() {\n" - " mainImage(fragColor, fragCoord);\n" + " vec4 c;\n" + " mainImage(c, fragCoord);\n" + " vFragColor = c;\n" " }\n"; typedef struct { |