Another idea (untested...like the others): Attach an IRenderHook to the shadow, disable depthbuffer writes before rendering via gl, enable them afterwards. After drawing the game world, render the background as a seperate object/world. That way, the background will overwrite the overlapping parts of the shadow. This won't work with a blitted or unicolored background though. But with something like in ballbox, it actually should.