summaryrefslogtreecommitdiff
path: root/examples/opengl/cube/fshader.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/cube/fshader.glsl')
-rw-r--r--examples/opengl/cube/fshader.glsl18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/opengl/cube/fshader.glsl b/examples/opengl/cube/fshader.glsl
new file mode 100644
index 0000000000..18068cf0e6
--- /dev/null
+++ b/examples/opengl/cube/fshader.glsl
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+// Set default precision to medium
+precision mediump int;
+precision mediump float;
+#endif
+
+uniform sampler2D texture;
+
+varying vec2 v_texcoord;
+
+//! [0]
+void main()
+{
+ // Set fragment color from texture
+ gl_FragColor = texture2D(texture, v_texcoord);
+}
+//! [0]
+