Color output based on moment data

This commit is contained in:
Dan Paulat 2021-07-27 00:24:12 -05:00
parent 421c600ed0
commit f004c7aee0
5 changed files with 176 additions and 60 deletions

View file

@ -5,9 +5,22 @@ precision mediump float;
uniform sampler2D uTexture;
in vec2 texCoord;
flat in uint dataMoment;
layout (location = 0) out vec4 fragColor;
void main()
{
gl_FragColor = vec4(1.0f, 0.0f, 0.0f, 1.0f);
if (dataMoment < 126u)
{
fragColor = vec4(0.0f, 0.5f, 0.0f, 0.9f);
}
else if (dataMoment < 156u)
{
fragColor = vec4(1.0f, 0.75f, 0.0f, 0.9f);
}
else
{
fragColor = vec4(1.0f, 0.0f, 0.0f, 0.9f);
}
}