now grid is read from texture memory