Painfully slow progress as is normal for me, but the shadow mapping experiment continues well. I'm trying very hard to make sure I understand everything properly rather than just copy-paste code, hence the snail-like pace.
I've combined the shadow map with standard normal-based lighting now. I pass the diffuse value from the vertex shader into the pixel shader then reduce the diffuse value down to the ambient minimum if the pixel is in shadow, ensuring that the shadow colours are the same as a face recieving no direct light.
I'm using the method of rendering back-faces only into the shadow buffer as it produces less artifacts and have to say that when combined with normal diffuse lighting, it produces excellent results. The next step is to figure out why the pixels for the shadow are so large and implement something like PCF to smooth them out, although I suspect there is something more fundamental wrong at the moment that just the lack of a smoothing function and need to investigate that first.
But good progress nonetheless, considering that I do feel I've actually implemented every step of this rather than just copied code from a tutorial. All good fun.
[EDIT] So found out why the pixels were so large.
int size = 256;
depthTexture.acquire(graphics, 256, 256, D3DFMT_R32F, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT);
Turns out when you write code like that, it doesn't actually make much difference when you change the value of size. Doh!
With a 1024x1024 depth texture, I now get the kind of size of shadow pixels I'd expect, so now on to PCF I guess.