sure, just check the alpha value of the hit pixel, which can be done using the hit structure and pixel_for_bmap or something like that. Then either decide depending on that already if there is no shadow, or start another trace ignoring the object and so on. I did this a long time ago and should be really easy to realize.