I’m looking for a way to render 3D objects on top of the scene, for menus and inventory manipulations. These are the solutions I see :
- Have a separate render pass, like what Unity 3D allows you to do via layers and multiple cameras. Unavailable in Unreal AFAICS.
- Clear the depth buffer before rendering the top objects. Would probably screw up other systems like shadow mapping though, so a pretty involved mod of the engine.
- Use the Disable Depth Test flag, but that’s only available for Translucent materials, and those have nasty temporal AA artifacts unless that was improved recently. Translucent is probably also costlier?
- Depth offset added to scene objects, and render top objects close to the near plane, so that scene objects never overdraw ‘HUD’ objects. Found no way to customize that in Unreal’s APIs.
Basically, the challenge is to prevent scene objects from flickering on top of the HUD. Slate must already be using a separate pass, so it must be feasible, although in this case some limited lighting is also needed.
Anyone implemented something similar? Any tip appreciated!