now grid is read from texture memory
 fix bug on accessing grid
fixed problem accessing grid on texture memory