summaryrefslogtreecommitdiff
path: root/examples/resources/shaders/glsl100/lightmap.fs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/resources/shaders/glsl100/lightmap.fs')
-rw-r--r--examples/resources/shaders/glsl100/lightmap.fs22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/resources/shaders/glsl100/lightmap.fs b/examples/resources/shaders/glsl100/lightmap.fs
new file mode 100644
index 0000000..9f0bcd2
--- /dev/null
+++ b/examples/resources/shaders/glsl100/lightmap.fs
@@ -0,0 +1,22 @@
+#version 100
+
+precision mediump float;
+
+// Input vertex attributes (from vertex shader)
+varying vec2 fragTexCoord;
+varying vec2 fragTexCoord2;
+varying vec3 fragPosition;
+varying vec4 fragColor;
+
+// Input uniform values
+uniform sampler2D texture0;
+uniform sampler2D texture1;
+
+void main()
+{
+ // Texel color fetching from texture sampler
+ vec4 texelColor = texture2D(texture0, fragTexCoord);
+ vec4 texelColor2 = texture2D(texture1, fragTexCoord2);
+
+ gl_FragColor = texelColor * texelColor2;
+}