Deferred Point Lights

I got point lights in and they’re beautiful 😀

I know, the scene looks like a mess, but it’s only because i was benchmarking. I have 150 light in the scene. With 140 lights i get 60 fps (using fraps to count my fps). Rendering a sphere for each light rather than the slow and lazy approach of using a fullscreen quad for each. This can be done faster by using screen-aligned quads.

There are a few probs that needs fixing though. There’s a rim at the edge of the model and some lighting looks as thought its being clipped. This is probably because of the sphere model being distorted due to the projection, screen-aligned quads will fix this. A quick workaround is to scale the sphere for each light by about 10% more.

I’m putting off spotlights until another time because i want to do realtime light scattering (god’s rays). Found a nice tutorial here. He used OpenGL, but the concept remains.

That’s all for now, see you in about a week


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 )

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