Per-Pixel 2D Shadows on the GPU

Below is my implementation of per-pixel shadows on the GPU, using far fewer passes and state changes than other current techniques such as Catalin Zima’s soft shadows. This technique also has a lot of room for optimization, as only one channel is currently used. Further, the blur pass is performed only in the horizontal direction, and can be included in the same step as the light rendering. Special thanks to the user “Nego” on the LibGDX forums, who expanded on my previous attempts with some great optimizations. 

Per-Pixel 2D Shadows on the GPU (using LibGDX)



Graphics by Kenney from


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s