0

I'm new to WebGL. I'm using pixel array in texture2D API. It works fine when I have unpacked pixel array ( size = width * height * 4).

Is it possible to have packed pixel array (size as width * height) and unpack the color in texture API?

Joe
  • 365
  • 2
  • 9
  • 24
  • What do you mean "packed pixel array*. Do you mean indexed texture / paletted graphics like this? https://stackoverflow.com/questions/19695658/emulating-palette-based-graphics-in-webgl-v-s-canvas-2d – gman Apr 29 '19 at 17:39
  • Yes. Exactly. I would like to have only one channel texture and look up the color in the texture. Do you have any example? – Joe Apr 29 '19 at 18:08
  • Did you read the answers in the linked question? They have examples – gman Apr 29 '19 at 21:46

0 Answers0