Sampling from velocity texture is now fixed and the code is cleaned up. However the obstacle creation has been broken. This might be because of a change in the terrain vertex buffer object creation. Check this with Nordahl.