Finally fixed viewport bug. Need to account for big textures.