mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Adding custom offset and scaling for color table to fragment shader
This commit is contained in:
parent
3e92847901
commit
aa48d8610a
6 changed files with 60 additions and 14 deletions
|
|
@ -4,6 +4,8 @@
|
|||
precision mediump float;
|
||||
|
||||
uniform sampler1D uTexture;
|
||||
uniform uint uDataMomentOffset;
|
||||
uniform float uDataMomentScale;
|
||||
|
||||
flat in uint dataMoment;
|
||||
|
||||
|
|
@ -11,7 +13,7 @@ layout (location = 0) out vec4 fragColor;
|
|||
|
||||
void main()
|
||||
{
|
||||
float texCoord = float(dataMoment - 2u) / 253.0f; // TODO: Scale properly
|
||||
float texCoord = float(dataMoment - uDataMomentOffset) / uDataMomentScale;
|
||||
|
||||
fragColor = texture(uTexture, texCoord);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue