Create a drop shadow

Hi!

I’m looking for an easy way to create a drop shadow effect behind a ofPlanePrimitive.
Currently i create two ofPlanePrimitive layers, one solid white and the other semi transparent black. This gets close to the desired effect but it misses the blurred edges.
I can find some add ons for creating blurs but they keep the sharp edges of the ofPlanePrimitive.

Am i looking in the right direction or should i be doing something totally different for creating a simple drop shadow?

Many thanks!

Hi there!

You are indeed looking in the right direction. But what you have to do, is to have a bigger “canvas”.
What I mean is, if you what to do a drop-shadow for a 50px square, you will have to draw it in texture/fbo with, for example, 75px. So that you have space for X and Y shifts, blur size, etc.

Hi thanks for the reply!

I get what you mean, create a plane big enough for the blur to “fade out” in. But i can’t find a way to create a blur texture to bind to a simple ofPlanePrimitive… The solutions i found where all about blurring the whole view.

Yes, I think usually the add-ons apply some fx to the whole scene, using the frag coords. I think it’s better if you do your own shading.

This GPU Gem is a great one. I’ve used a ported version several times.