Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a lot of billboarded 3D spheres (they have a heightmap so work properly with depth and penetration; although each is made of just a quad (with slight distortion), they look and feel and are true 3D spheres):

The choice of using billboards is for throughput on low-end hardware.

How can I effectively cast shadows from these? It occurs to me that using proper shadow-volumes will take a lot of fill-rate and complexity. I am fill-rate sensitive.

I was wondering if there is any way to billboard the shadows cast by my billboards?

share|improve this question
up vote 5 down vote accepted

Yes, it's very possible. And should suit your needs for speed well, as this used to be common practice amongst older games.

A very good reference is the old tome by André LaMothe: Tricks of the 3D Game Programming Gurus (Chapter 14).

The basic jist of it is to simply project a shadow version of your billboard onto the floor. A more advanced version for arbitrary Meshes can be found Here

share|improve this answer
And since he's using spheres, figuring out the proper shadow shouldn't be too difficult =) – Jari Komppa Sep 19 '11 at 9:23
As my spheres have depth, despite being billboarded, I'm thinking I have to compute the depth in the shadow too.. if it was not too difficult I wouldn't be asking =) – Will Sep 19 '11 at 16:53

It sounds like your billboarded spheres are outputting depth when you draw them into the main view, so you could use shadow mapping and just draw them into the shadow map exactly the same way.

share|improve this answer

Do you have access to programmable shaders? If you do, setting a depth map to project sphere shadows would work easily.

What you need to do is set an alpha mask texture (if you're not using one already) for the billboards and in the shader if the alpha value from the texture is less than 1, tell the shader to discard the pixel/fragment. That way the pixels don't get counted towards the rendering of the depth map and they will show up clearly as circles instead of squares when you don't check for alpha.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.