   deferred shading
  I've decided to go ahead with deferred shading as my lighting method, because it seems easier to implement than traditional fragment lighting. Unfortunately, I've been able to find fairly little information on the topic. The basic process seems to be like this:activate fboactivate "fat buffer" program (vert/frag)render scene as normal sans lighting  "fat buffer" program stores geometry data in gl_FragData[0] and [1]disable "fat buffer" programdisable fboenable deferred shader (frag)for each light:  pass light parameters to the program    this is where i get confused, i looked at ogre's shaders for reference and they're not very clear.    i know i pass the data in, but how do i make it actually render? bind the fbo again?  calculate lighting equations as with a standard lighting shader  write to gl_FragColordisable deferred shaderHowever, I obviously am hung up on the actual lighting phase. It would probably be a bit more obvious if I was more experienced with FBOs, but I'd like to know if I'm headed in the right direction before diving into my code.   
  Basically what you do is save all the data you need for the shading calculations to textures, called G-Buffer. The data could be anything, but you probably need position, normal and diffuse color at least. Then you have to obtain the data and spread volume of the light source. The volumes spatial dimensions are required to cover places where the light has effect. In order to be effective you would want the volume to be as tight as possible. You use your regular light source input data. When rendering the volume to screen the regular rasterizer do an effective clipping for you (in screen space width and height). By setting the depth test right and utilizing early-z cull, you also clip in the third dimension. The shading calculations are performed between data from the light source and texture reads from the G-Buffer. Since you are rendering the volume to screen you always know from which location in the buffer to read.So to give a clear answer to your question, the input to the shading equation comes from uniform parameters passed from every light source and individual texture reads related to the screen position. If you want to handle several lights you have to perform some kind of blend into the frame buffer   ;This here is a great tutorial that should walk you through the basics of implementing a deferred renderer, right down to the lighting equations and the shader code.  Nvidia also has a tutorial that's geared towards development on their GPU's (naturally), but I found it quite helpful for some more in-depth issues.  They also have a DX demo in one of their SDK's.As for your question regarding that specific step in the rendering process...Those FBO's mentioned in the first pass are essentially going to be a group of texture to which you'll render information about all of your geometry on-screen.  Typically this consists of depth or position, the diffuse color (from your texture), the specular color, and any other information necessary to compute your lighting in the second pass.  Then in the actual lighting pass, you will apply those textures, read the data from them  per-pixel, and then use that data to calculate a final color for the pixel.   ;Quote:Original post by niteiceI've decided to go ahead with deferred shading as my lighting method, because it seems easier to implement than traditional fragment lighting.Keep in mind you will still need to use traditional forward rendering for transparent geometry.   