Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Here's my dilemma : I want to have light sources placeable by the player, in terms of lanterns.

I know the best way to do this is to use pixel shaders, which I have done a lot of research and use on, but it seems so far that the lights are static.

So what would be the best method to create a dynamically lit scene?

I already have to workings of a few classes to make 2d lights (Color, Position, Type, Direction, Power) but it is just rendering that is the problem.

Thanks for your considerations!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You should look into Deferred Shading which is great for rendering scenes with a large amount of dynamic lights (video).

enter image description here

As for how to implement it, I recommend starting from here (courtesy of Catalin Zima and Roy Triesscheijn).

share|improve this answer
    
Cool, with a few tweaks I think I can modify this for 2D as well. +1. It's weird I've never come across this blog before, I searched a lot on this topic before posting and this blog never came up once! –  Ross Jan 2 '12 at 17:14

Your Answer

 
discard

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.