Terrain vertex texture update

Im using vertex texture as terrain height map. I dont have idea how update it.
Grid is writen as VAO, because somewhere i saw is a better to have own attributes then use a standart.

VAO as well as its texture coords are moving by camera.

I could create a “datacubes” witch have height data as buffer that was readed from file on another thread. For a every frame i could make a colision between each cubes and map, caculate region and update, but i dont think is efficient enought.

Something like this:

Thanks

There is no such thing as a “vertex texture.” All textures are the same, no matter what shader stage you access them from.

You update texture with glTexSubImage2D, possibly using a buffer object to transfer the data.