Recreating DLSS triggers additional buffer allocations and other internal work that shouldn’t happen every frame, which results in FPS drops during camera blending.
Questions:
Is it expected that DLSS is re-created when the camera’s aspect ratio changes?
Is there any way to apply ConstraintAspectRatio without changing the actual viewport size, to avoid DLSS recreation?
We considered simulating the letterbox effect manually (via UI widgets or a post-process pass), but that would require manual FOV adjustments, masking, and extra setup — which feels overly complex. Is there a simpler or recommended way to achieve this?
Thanks for reaching out. Let me try and answer your questions as best as I can:
Is it expected that DLSS is re-created when the camera’s aspect ratio changes?
I can’t speak to the implementation details of the DLSS plugin, as Nvidia maintains it. Still, I can imagine the plugin needing to recreate some internal state, since it operates on rendering resources that can be changed on the engine side (i.e., the SceneColor texture). Have you considered reaching out to them to get more details about this issue?
Is there any way to apply ConstraintAspectRatiowithout changing the actual viewport size*, to avoid DLSS recreation?*
The UCameraComponent has an option to enable constraining the camera’s aspect ratio via SetConstraintAspectRatio, which, from my investigation, does not change the viewport size. Instead, the area we render is based on the camera’s view information. You can set your desired aspect ratio via SetAspectRatio before calling SetConstraintAspectRatio in your game logic, and the renderer should account for this constraint automatically, giving you the letterboxing effect “for free”. We use the same approach in our own titles, so I suggest giving this a try.
We considered simulating the letterbox effect manually (via UI widgets or a post-process pass), but that would require manual FOV adjustments, masking, and extra setup — which feels overly complex. Is there a simpler or recommended way to achieve this?
If I understand correctly, this question can also be partially answered by my previous response. However, there are some caveats to consider depending on your specific use case. Please provide some details on when you need to apply a letterboxing effect.