I’m currently working on a material that uses a texture sheet with different colors as a color palette. I want to be able to select an index of the sheet to use that specific color (so “0” would be the first and “1” the second tile). So far I’ve created a material function based on the flipbook function, using only what is necessary and replacing the time nodes with a scalar input. However, the flipbook function uses a scalar value from 0 to 0.9 (after rounding it down) to determine the tiles, which looks like a percentage. What I want is to use whole numbers to select a specific tile.
Can this be done with a material function in the editor or does it have to be done in C++? In any case, how can I set up the function to use whole numbers, based on the number of columns and rows?