mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:00:04 +00:00
Color radar image using a color table
This commit is contained in:
parent
f004c7aee0
commit
c06230ed6c
6 changed files with 81 additions and 14 deletions
|
|
@ -3,7 +3,7 @@
|
|||
// Lower the default precision to medium
|
||||
precision mediump float;
|
||||
|
||||
uniform sampler2D uTexture;
|
||||
uniform sampler1D uTexture;
|
||||
|
||||
flat in uint dataMoment;
|
||||
|
||||
|
|
@ -11,16 +11,7 @@ layout (location = 0) out vec4 fragColor;
|
|||
|
||||
void main()
|
||||
{
|
||||
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);
|
||||
}
|
||||
float texCoord = float(dataMoment - 2u) / 253.0f; // TODO: Scale properly
|
||||
|
||||
fragColor = texture(uTexture, texCoord);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue