To make the riff sound right you have to make sure that you rest the underside of your fretting hand on the unwanted strings so that when you play the riff you can really dig in and almost strum. Since the unneeded open strings are muted only the notes you want will come out. SRV uses this technique all the time, especially in songs like pride and joy and rude mood.