I implemented deferred rendering in my little engine using framebuffers but there is no dynamic lighting for now. The g-buffer contains positions and normals in view space and albedo.
To implement real time lighting, I guess that I need to perform one pass for each light. Given the position and shape of a light, how can find all pixels affected by the light? I want to support point lights, spot lights and directional lights.