r3eckon/Unity-SimpleGrid-Shader

About filling the inside of the grid with color.

Closed this issue · 1 comments

About filling the inside of the grid with color. Is it possible to fill multiple grids with colors?

Using only one set of grid coordinate variables (Selected Cell X & Selected Cell Y). After the old coordinate value is updated, the color in the grid (old position) still exists.

Thank you

Use an array to store selected cell positions and a for loop color them in the shader. Look up documents or tutorial on how this works in shader if you don't know how to do it. You can also encode a true or false value on a texture and sample this texture with the shader instead of using an array. The texture must have the same amount of pixels as your grid has cells inside.