Shadow Maps on Omnidirectional Lights

Theoretically, using six shadow mapped spot lights to piece up a shadow casting point light is not a big deal. Especially if the light geometry calculation for deferred lighting is correct. Well, in my engine, it was not the case. :-)

There was a hidden calculation error that resulted in a frustum with incorrect corner points that made it bigger than desired. This error caused no problem so far because projected mask texture on spotlights and “discard” codes in fragment shader prevented the extra pixels from being seen. But once I have used spot lights with no mask to render point light, the result was erroneous. It looked so strange and mysterious that it took few hours to find the root of the problem.

Finally, the shadows on point light are working now, and I proudly present some screenshots here.

Shadow map on omnilight. Shadow map on omnilight. Shadow map on omnilight. Shadow map on omnilight.

About these ads

Posted on January 29, 2013, in GLSL, opengl, rendering and tagged , , , , . Bookmark the permalink. 6 Comments.

  1. When will this be available to download? I’ve got a near-fully concepted game that i would like to begin work on, but the BGE doesn’t cut it, UDK is too complicated for what we want to do and we do not have the money for a unity pro license. Is it going to be free? Or at least cheaper than unity and udk? Thanks in advance for reading. Engine looks great.

    • Hi,
      I can not say anything about availability. I working on this project on my spare time, so the progress is quite unpredictable and slow. Of course, sooner or later it will be released, I hope… :-)

  2. Nice work so far, you seem to know what you’re doing.
    I was wondering if you’ve got a version available for me and others to test. It would be nice to mess around with the current functionality to see if it is suitable for some project ideas that I’ve had.

    I’m also curious under what license this will be released or if it remains proprietary.

    • I think, releasing a test version is a good idea, maybe it can fulfill some simpler project requirements and give us some feedback. Probably, we will declare a milestone in the development somewhere in the future, so check back some time.

      The licensing is an open question. I would like to complete the basic features first, then I will see what is the best solution both for users and me.

  3. Dude, don`t render your scene 6 times. With geometry shader you can render it to the cubemap with a single pass.

    I can provide an example, if you want.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 163 other followers

%d bloggers like this: