summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
author00-KAMIDUKI <96825783+00-KAMIDUKI@users.noreply.github.com>2025-07-22 03:05:47 +0800
committerGitHub <noreply@github.com>2025-07-21 21:05:47 +0200
commit50758505d5c784052437a371a707fc2dc60bb34a (patch)
tree7c1b6748799044ae3906c500c10ce4629454b075 /example
parent462729d8655a3a37ba19fe254d8ecb6677963563 (diff)
example: make screen shader example compatible with glsl 300 (#10846) (#11132)
Diffstat (limited to 'example')
-rw-r--r--example/screenShader.frag11
1 files changed, 7 insertions, 4 deletions
diff --git a/example/screenShader.frag b/example/screenShader.frag
index 5eeac17a..71598e51 100644
--- a/example/screenShader.frag
+++ b/example/screenShader.frag
@@ -1,16 +1,19 @@
//
// Example blue light filter shader.
-//
+//
+
+#version 300 es
precision mediump float;
-varying vec2 v_texcoord;
+in vec2 v_texcoord;
+layout(location = 0) out vec4 fragColor;
uniform sampler2D tex;
void main() {
- vec4 pixColor = texture2D(tex, v_texcoord);
+ vec4 pixColor = texture(tex, v_texcoord);
pixColor[2] *= 0.8;
- gl_FragColor = pixColor;
+ fragColor = pixColor;
}