Is there such a thing as screen-space shadows? I know that most shadow projection comes from rendering the world from the viewpoint of the light source, projecting the shadows onto a large square texture laying on the ground, and then rendering the scene again using data from that texture to shade things.
But what if that texture wasn't square? Ultimately, the scene is going to be projected into the screen, and using the viewport you can calculate the trapezoid-shaped block of the world that you know is going to be visible.
What if you then did all of your light projection onto that shape instead? Is there a way to make the math work? Seems to me that the end result would allow everything on the screen to always be shadowed (rather than shadows disappearing when too far from the camera), and would automatically give more shadow detail closer to the camera.
Seems like someone would have already tried this, so what am I missing?