I've been trying to figure out a way to create "BorderShadows" on rectangle 2d sprites. I don't know much about writing shaders, but I'm trying to accomplish something similar to this:
<img src="http://1.bp.blogspot.com/-d2jIdngficg/UCKdvKQI2RI/AAAAAAAAAA4/WTE9ujIRS9w/s1600/Depth%2BExample.png" border="0" />
(I took this picture from the internet of someone trying to do the same thing as me)...
Notice how it is showing depth by casting shadows? I'm trying to do that without creating a bunch of sprites or lowering FPS alot. Thanks for any help you can give me or links or whatever. I've been at this for a while.
If anyone is interested, I've been trying to work on this WebGL effect. It works good, but when I draw the RightBorder, it oversamples the TopBorder, making it look weird
if(vTex.y>0.9 && vTex.y<1.0)
front=vec4(0.8, 0.8, 0.8, 1.0)*front;
if(vTex.y>0.8 && vTex.y<0.9)
front=vec4(0.7, 0.7, 0.7, 1.0)*front;
if(vTex.y>0.7 && vTex.y<0.8)
front=vec4(0.6, 0.6, 0.6, 1.0)*front;