The Ritual of Pain
Admittedly my method of implementing shadow is weird. First, I Render The object with shadow shader, but without textures. resulting in a black and gray model and a Z buffer. Then I rendered the textured modeled right no top of that with a Z offset and alpha blending. Of course it took a while to figure out all the oddness in DX. The solution is apparently ….
inline DWORD F2DW( FLOAT f ) { return *((DWORD*)&f); }
Device->SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, F2DW(-8.0f));
Yeah, why Typecast and take the address and follow pointer ? why negative numbers ? beats me, that’s just what turned out to work. Now if this is not bloody weird I don’t know what is.
Moving on to Unit Control as per Enter’s request, as soon as I find time. Meh, can’t ever really leave this project alone …




