   Deferred rendering/water/reflections
  Hi, I'm experimenting with a deferred renderer. So far, so good, but it came to a point that I should integrate my existing water implementation(forward).Since the water is transparent and actually I don't do any advanced lighting on it, I render it after the deferred lighting pass. Now, how I'm supposed to approach the reflection texture generation, since my meshes and terrain shaders only output diffuse/albedo color, normals etc. , but all the lighting happens in the deferred pass as post process. How should I render my meshes and terrain , so in the reflection texture I have lighting (mostly simple, no bumpmapping probably), not just pale diffuse colored reflection ?Should I write a forward rendering technique with lighting in my terrain shader, so when rendering reflection I could use the technique that outputs lit meshes, but when I render attributes to the G-buffer, use the other technique that outputs diffuse color only to the render target ? Can I use the already generated G-buffer( I render water after the lighting passes at the end) to access it in the water renderer and generate the reflection texture containing lit meshes ? Should I keep a light accumulation buffer from the deferred lighting passes and mirror that to overlay the rendered meshes to give them lighting ? In short, how can I generate a reflection texture for a water surface that contain lit meshes in a deferred renderer, where water is rendered to the frame buffer in forward step after the deferred lighting passes ?On a kinda side note, can I have my water rendered in deferred fasion, and have it full lit by local lights and stuff, but still be transparent ? What kind of sacrifice I should make..another 1/4 G-buffer ?Thanks in advance.   
  The reflection can be done by just using your full deferred pipeline again (without the water step, and with a clipping plane). Use the GBuffer, post-lighting, etc, and then save the result to your reflection texture.Then run the whole deferred pipeline again, this time including your water pass, making use of the reflection texture.Yeah there's no reason you can't use traditional forward lighting on your transparent objects, and deferred lighting on your opaque objects. You don't need an extra GBuffer for this.   ;  Ok, thank you. I'll give it a try as you suggested, and if I find it too slow to have full blown lighting in my noisy reflection, I could use simpler forward lighting techniques to approximate.About the second question, I meant something like that :No forward passes at all. Even the water is deferred. Render meshes attributes to the G-buffer, render water attributes as well to the G-buffer, perturb normals for waves etc. In the lighting pass I could have a really impressive water all lit by lights hanging above the water surface, but because it's deferred and no info stored bellow the water surface, I can't make it transparent. My thought about the second smaller G-buffer was to store attributes for the water, and the main to store attributes for the scene. Then I could probably make use of these 2 ,to make a deferred rendered lit by many lights water that is also transparent ?   ;  You can render water without transparency by running your full deferred rendering pipeline for the underwater portion of the water as well, then sampling it from your water shader.  That also gives you the ability to do refraction of the stuff underwater, which you can't easily do with regular transparent water.--Jason   