I would like to use 2-component byte texture. Something like LUMINANCE_ALPHA8I_EXT. Is it supported in jme3?
Explanation:
I need it for special palette based shader. First byte indicates palette type, second byte offset into palette. Palettes are defined as 10 groups of 64x256 textures (which I will join into bigger one for efficiency) with each type mapped to one of 64 choices for given objects.
It is generally simple job to resolve it in the shader - I will just pass palletteIndices[10] and then do texture lookup of something like (with interpolation disabled most probably, to avoid bleeding between different textures)
uvec2 tex = texture2D(texture, texCoords)
color = texelFetch2D(combinedPalettes,uvec2(paletteIndices[tex.y],tex.x))
and paletteIndices[10] being a material parameter.
you have a Luminance8Alpha8 image format. IMO it should be ok for what you want to do. LUMINANCE_ALPHA8I_EXT is not in opengl2 specs, it looks like it an nvidia only extension…not sure about this though.
So I can upload normal texture and access it with uvec2/uvec4 and it will work as expected, giving me 0-255 results on each channel? Haven’t considered it, might be just working - will give it a try, thanks.