Several people have asked me to tell them how to do smooth scrolling in Direct3D.
The problem is that you cannot use the per-pixel DOS algo because this requires locking and unlocking textures which is a big no no in a render loop.
So here is the solution with code for Direct3D 9.0.