28 lines
No EOL
642 B
GLSL
28 lines
No EOL
642 B
GLSL
#ifdef GL_ES
|
|
precision mediump float;
|
|
#endif
|
|
|
|
// Custom attributes.
|
|
|
|
uniform sampler2D uColorTex; // Sampler for the color registered data
|
|
uniform sampler2D u_v4l2cam;
|
|
uniform sampler2D u_gradient;
|
|
uniform sampler2D u_particle;
|
|
|
|
in vec2 gTexCoord;
|
|
in float gTemperature;
|
|
|
|
void main()
|
|
{
|
|
vec2 st = gTexCoord;
|
|
st /= 3;
|
|
st -= vec2(0.5);
|
|
st *= 1.45;
|
|
st += vec2(0.5);
|
|
st.s += 0.15;
|
|
st.t += 0.16;
|
|
float thermo = gTemperature;//texture2D(u_v4l2cam, st).r;
|
|
gl_FragColor = vec4(texture2D(u_gradient, vec2(thermo, 0.5)).rgb, 1);
|
|
// gl_FragColor = texture2D(u_particle, gTexCoord);
|
|
// gl_FragColor = vec4(1);
|
|
} |