D3D Shaders - how does it work?