Use texture2DArray for colormap to work with OpenGL ES

This commit is contained in:
2025-03-05 21:14:43 +01:00
parent 5150ec5639
commit 7b70b6cce5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
uniform sampler2D qt_Texture0;
uniform sampler3D lut_table;
uniform sampler1DArray colormap;
uniform sampler2DArray colormap;
uniform vec3 mtf_param[3];
uniform vec2 unit_scale;
uniform bool bw;
@@ -30,7 +30,7 @@ vec3 falsecolor(float color)
{
color *= 255.0 / 256.0;
color += 0.5 / 256.0;
return texture(colormap, vec2(color, colormapIdx)).rgb;
return texture(colormap, vec3(color, 0.5, colormapIdx)).rgb;
}
vec3 checker()