2020-10-18 16:52:22 +00:00
|
|
|
#ifdef GL_ES
|
|
|
|
precision mediump float;
|
|
|
|
#endif
|
2020-10-18 10:22:08 +00:00
|
|
|
|
|
|
|
// Custom attributes.
|
|
|
|
|
2020-10-18 16:52:22 +00:00
|
|
|
uniform sampler2D uColorTex; // Sampler for the color registered data
|
2020-10-19 14:14:53 +00:00
|
|
|
uniform sampler2D u_v4l2cam;
|
2020-10-19 15:03:34 +00:00
|
|
|
uniform sampler2D u_gradient;
|
2020-10-19 18:25:24 +00:00
|
|
|
uniform sampler2D u_particle;
|
2020-10-18 10:22:08 +00:00
|
|
|
|
|
|
|
in vec2 gTexCoord;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2020-10-19 14:56:00 +00:00
|
|
|
vec2 st = gTexCoord;
|
|
|
|
st /= 3;
|
|
|
|
st -= vec2(0.5);
|
|
|
|
st *= 1.45;
|
|
|
|
st += vec2(0.5);
|
|
|
|
st.s += 0.15;
|
|
|
|
st.t += 0.16;
|
2020-10-19 15:03:34 +00:00
|
|
|
float thermo = texture2D(u_v4l2cam, st).r;
|
|
|
|
gl_FragColor = vec4(texture2D(u_gradient, vec2(thermo, 0.5)).rgb, 1);
|
2020-10-19 18:25:24 +00:00
|
|
|
// gl_FragColor = texture2D(u_particle, gTexCoord);
|
2020-10-19 14:14:53 +00:00
|
|
|
// gl_FragColor = vec4(1);
|
2020-10-18 10:22:08 +00:00
|
|
|
}
|