Former-commit-id:06a8b51d6d
[formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f] Former-commit-id:9f19e3f712
19 lines
No EOL
536 B
GLSL
19 lines
No EOL
536 B
GLSL
// this shader program sets values into a mosaic texture
|
|
// which is the same size as the screen (frame buffer)
|
|
|
|
uniform sampler2D radarData;
|
|
uniform sampler2D mosaicTexture;
|
|
uniform int height;
|
|
uniform int width;
|
|
|
|
void main(void)
|
|
{
|
|
vec2 xy = gl_FragCoord.xy;
|
|
vec4 radarVal = texture2D(radarData,gl_TexCoord[0].st);
|
|
vec4 curVal = texture2D(mosaicTexture, vec2((xy.x / width), (xy.y / height)));
|
|
if ( radarVal.r > curVal.r ) {
|
|
gl_FragColor = vec4(radarVal.r,0.0,0.0,1.0);
|
|
} else {
|
|
gl_FragColor = vec4(curVal.r,0.0,0.0,1.0);
|
|
}
|
|
} |