I'm trying to achieve rendering of cell-based terrain (one like in old games like Transport Tycoon) with strong cell borders. To optimize performance I pass a texture with an actual game map in which I try to encode a cell type for a custom shader, so the shader could lookup the type for every cell and determine which textures to apply to a particular cell while rendering the terrain mesh.
It would be convenient to pass that map in an integer type so I could mask particular bits with bitwise operators and basically pass a lot of data in just one byte. Passing floats leads to losing precision and I can't be sure I have the same integer after converting to a float and back to int.
Is there any way to pass an array (2d array or even texture is better) of Integer type to a shader or there's a reason they don't have SetIntegerArray in API like lack of compatibility with mobile GPU or something?