I have some questions that might be simple to answer but I have some concerns regarding the classic “Deferred Shading” for lighting purpuses while using custom shading implementations
. Regarding Deferred Shading are this the main steps:
- Apply Shader that outputs vertex Position and render the full scene to a texture
- Apply Shader that outputs vertex Normal and render the full scene to a texture
- Apply Shader that outputs vertex Base Color and render the full scene to a texture
- Apply Shader that outputs vertex z buffer and render the full scene to a texture
- …Apply any other shader that outputs [Anything else] and render the full scene to a texture
- Apply Combining Shader and do the math for each fragment and render to Framebuffer
- The render targets must be textures? so should I need to use 1 texture for each stage? in this case 5 textures (4 + 1 final)?
- The least one should be a quad filling the entire screen with the combining shader bound?
Are these the essencial steps on implementing deferred shading on a simplified point of view?
Another question is: By using this method, if I wanted to apply a custom shader to a specific element (lets say a special effect such as vanishing and/or blinking, etc…) would I have to adapt the step 2 to add the effect to the Color Buffer or will I have to add another staging to the process?