I've been researching and working on implementing shadow mapping into my engine. I've been following this tutorial pretty closely but I've run into an issue.
Here are some pictures to show exactly what is wrong:
I'm guessing I need to somehow compare the fragment depth of the shadow map with the fragment depth of the normal render and if the fragment depth of the render is <= the fragment depth of the shadow then I don't apply the shadow.
That's just my guess, I really don't know if I'm even on the right track. Advice would be greatly appreciated.
I can post the code related to the shadow mapping but its' basically identical to the linked tutorials code aside from the differences in Java and C++.