aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge/scale_noaa.frag
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sludge/scale_noaa.frag')
-rw-r--r--engines/sludge/scale_noaa.frag31
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/sludge/scale_noaa.frag b/engines/sludge/scale_noaa.frag
new file mode 100644
index 0000000000..bf7aad7adf
--- /dev/null
+++ b/engines/sludge/scale_noaa.frag
@@ -0,0 +1,31 @@
+uniform sampler2D Texture;
+uniform sampler2D lightTexture;
+uniform bool antialias;
+uniform bool useLightTexture;
+uniform float scale;
+
+varying vec2 varCoord0;
+varying vec2 varCoord1;
+
+varying vec4 color;
+varying vec4 secondaryColor;
+
+void main()
+{
+ vec4 c11 = texture2D(Texture, varCoord0.xy);
+
+ //gl_FragColor = c11;
+
+ //if (gl_FragColor.a<0.001) discard;
+
+ vec3 col;
+ if (useLightTexture) {
+ vec4 texture1 = texture2D (lightTexture, varCoord1.xy);
+ col = texture1.rgb * c11.rgb;
+ } else {
+ col = color.rgb * c11.rgb;
+ }
+ col += vec3(secondaryColor);
+ gl_FragColor = vec4 (col, color.a * c11.a);
+}
+