While testing, I discovered that z-buffer shadows can be rendered when a model is invisible. Stencil buffer shadows are rendered as well when a model is invisble with render state settings. However, the result isn't very pleasant and the reason is quite obvious.
I've ran some tests with alphablending, the model is invisible due to alphablending and the shadows are casted but while the shadows are situated at a range where the model is visible/invisible rendered , this leads up to some kind of distortion. Alphablending is a pain in the as* when it comes to stencil shadows because when the model itself is invisible due to alphablending, part of the shadow is not visible. Alhpablending doesn't allow stencil shadows to be completly visible when they are situated behing a model's mesh. Strange, because z-buffer shadows work just fine. Here are two pictures who prove it:




The pictures show a model with a standard alphablending render state and a stencil shadow.
The sun rotates to make the shadow move and mark the difference.
Picture one: The shadow is being covered up for +-20 percent by the model's mesh.
Picture two: The shadow is situated underneed the player but as I've mentioned, the shadow is being coverd up for +- 95 percent due to alphablending.
I guess you get the problem But the sad thing is that I can't get this solved, not even with the stencil render states. I think you're probably right that it's an DirectX (D3D) issue is.
Good luck on finding a potential solution and completing your game OB

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB