Clever, but it sounds expensive! Re-rendering the entire scene (especially with that many objects) instead of a single raycast? I'm guessing you had no acceleration structure for any kind of raycasts, and if this was the only thing you needed raycasts for, it wasn't worth making one?