a snippet of the code strangely no errors what i was hoping for ColorTable (a palette in RGBA8), using MyIndexTexture (an 8 bits square texture in indexed colors)
shdr = LoadSpriteShader("palette.ps")
spr = CreateSprite(img)
SetSpriteAdditionalImage ( spr, img,1 )
//SetSpriteTransparency(spr, 1)
SetSpriteShader(spr, shdr)
do
sync()
loop
pixel shader
//Fragment shader
uniform sampler2D ColorTable0;
uniform sampler2D MyIndexTexture1;
varying mediump vec4 TexCoord;
void main()
{
mediump vec2 coord=TexCoord.st;
vec4 myindex = texture2D(MyIndexTexture1,coord ).rgba;
vec4 color = vec4 (texture2D(ColorTable0, myindex.xy));
gl_FragColor = color;
}