It's perfectly possible to do this. Most game engines (it's harder with graphics APIs, but it's possible) allow you to supply matrices, and these can represent skewing.
So, first of all, let's say you have a house (or a block of something) defined as the bottom polygon and the player's position:

First, for each line in the polygon you get the vectors pointing from the player's position to the ends of the lines, multiply them by two and add them to the player's position to get a "shadow" of the lines:

This gives you 4 points, which describe a quad.
If you have a way to draw custom quads, then just use this and texture it correctly. If you don't, then a line by line solution should work instead.
First, calculate the angle of the bottom line (the line you used to create the "shadow") and create a rotation matrix that transforms the line to a horizontal position. If the line is defined by the two points A and B, then this would be:
angle = atan2(B.y - A.y, B-x - A.x) matrix = | cos -angle, -sin -angle | | sin -angle, cos -angle |
Then multiply every point of the quad with this matrix, this should result in the following effect:

This is necessary to make the base of every quad aligned with the x axis. Now the line-by-line part. Get the distance on the y axis between the bottom and top lines of the quad (the base line and the "shadow") in pixels and loop through between 0 and this distance. The endpoints of the line parallel to the x axis, that's going across the quad at a specific y position are:
P1 = A + y / height * (D - A) P2 = B + y / height * (C - B)
using the naming from the image above. For an example look at this image:

Now, loop through this line pixel by pixel to get an x position. Now you have an x and y position in the quad's coordinate system. To convert this to uv coordinates, use the following formula:
u = (x - P1.x) / (P2.x - P1.x) v = y / height