Hey folks, I am developing two video game projects at the moment and I am developing my own game engine at the same time. The engine grows with my game projects and more and more features are ready to use. For a very long time, I only had a single render pass of my 3D scenes: I rendered all visible models using a PBR or Blinn-Phong-Shader - depending on the model's material - and it looked nice.
In order to improve Galactic Crew, I wanted to add shadows and improved laser effects. After doing some research, I implemented a Shadow Mapping algorithm to add shadows. This resulted in two additional render passes. Now, I have this sequence, if the shadows are activated in the settings:
- Render scene from the point of view of the main light source to create a Depth Map.
- Render scene from the point of view to create a Light Map (using the Depth Map from 1.).
- Render scene and apply shadows using Light Map from step 2.
I did some optimizations with your help and it worked like a charm in all scenarios (space, planets and dungeons). Then, I wanted to improve my laser beam effects. I added moving laser clutter to make it look more dynamic in combat situations and I added a Glow effect to make it look smoother. However, I had to add three render passes for the Glow effect: Create a Glow Map, blur Glow Map and add Glow Map to final scene resulting in this sequence:
- Render scene from the point of view of the main light source to create a Depth Map.
- Render scene from the point of view to create a Light Map (using the Depth Map from 1.).
- Render all laser beams from the camera's point of view into a Glow Map.
- Blur Glow Map using a bi-directional filter and increase brightness of the laser beam's inner areas.
- Render scene and apply shadows using Light Map from step 2.
- Use an orthogonal plane to add Glow Map to rendered scene from step 5.
So, if the shadows are activated and the player is in combat, I have six render passes instead of just one. I want to add planetary missions with water worlds and island this winter that will add even more render passes for water reflection, etc.
How many render passes do you guys use in your game project?