float zgrid = length(grid.xy - 0.5 * scale);float xgrid = length(grid.yz - 0.5 * scale);float ygrid = length(grid.xz - 0.5 * scale); should give you points, fmod basically chops values into segments each of the length [0,scale], the grid coordinates. Think of tiles, every tile has a local x,y axis. points within a tile go…