A way to fade out opaque objects
Fading out objects in a real-time 3D engine is among those things that seem way easier than they are. Fadeable objects need a transparent shader which requires additional work to render properly and can make generally less use of optimization techniques. Using transparent shaders to fade out objects means the comparably few frames that an object should look transparent negatively impact its rendering speed and quality even when it should look opaque. Methods working around this (swapping materials or entire objects, Alpha Hashing , ...) all have their pros and cons. In this post I want to present a method that neither solves this problem once and for all, but rather is another tool to consider under the right circumstances. The general idea is the following: Render the frame without the objects to fade (henceforth called "custom objects") into buffer A Render custom objects with their usual opaque materials into buffer B Render custom objects a second time into buffe