Long shadow in Pixel shader

Hey guys,
i´m working on a project, and i´m looking for a way to draw long shadows,
i´ve tried with the unc´s dropshadow shader but i would like to have something like this example:

Any tip to modify the dropshadow one?

Thanks in advance

here you go :)
gotta port that one to dx11 too

DropShadowAdvanced.zip (5.5 kB)

unc, this is simply perfect,

thanks a lot.


Hi unc,
thanks for contribution.
I’d like to use it with Edge like that

is it possible to get edge around the shadow?

DropShadowAdvancedEdge.zip (7.0 kB)

try this (but seems like too much setup for a small effect)

DropShadowAdvancedEdge_01.zip (8.6 kB)

Thanks unc,
“too much setup” is a way better then running contour for that!