Thank you very much :)) I actually used a separate camera at the light position to render the shadow casting objects onto a texture. Afterwards you can just compare the current texture pixel by pixel to a predefined texture and see how close they match ^^.