File: scale_noaa.frag

package info (click to toggle)
sludge 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,820 kB
  • sloc: cpp: 31,960; sh: 1,037; xml: 874; makefile: 672
file content (31 lines) | stat: -rw-r--r-- 627 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 * gl_FragColor.rgb;
	} else {
		col = color.rgb * gl_FragColor.rgb;
	}
	col += vec3(secondaryColor);
	gl_FragColor = vec4 (col, color.a * gl_FragColor.a);
}