mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:30:05 +00:00
Color output based on moment data
This commit is contained in:
parent
421c600ed0
commit
f004c7aee0
5 changed files with 176 additions and 60 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue