Lighting system for Cavery

Light (and darkness) will be an important part of Cavery. I want the player to feel small and vulnerable; most of the screen will be covered in black. That's why I'm working on a 2D lighting system. It's based mostly on shaders at the moment. All rendering is made by libgdx, of course!
That's the visible geometry (not covered by shadows):

First, I'm calculating visible area (using straightedge library, don't know if I'll stick with it):
Then I'm blurring it a bit to make the shadows softer and more realistic. Notice how they get softer with increasing distance from light source.
Then I'm merging it with the original geometry with a little bit of additional effects (edges catch light, see it?).
I'm pretty satisfied with the outcome. What do you think about it? Oh, and there's another one version, where objects are hidden in shadows, only their edges catch some light):

2 Response to "Lighting system for Cavery"

  1. Danik says:

    Looks sweet, nice soft shadows!

    Anonimowy says:

    Great job, any chance to see part of the code :-) will be nice to have a glimpse of it in libgdx forum...

    Anyway, nice work

Prześlij komentarz

Powered by Blogger