Retainer box failing at resizing/certain sizing

Recently we’ve been trying to implement a recoloring material in a vertical box of images and we noticed that the retainer box fails when it is larger that a certain size. Attached is a video of what we see in designer mode, but it is the same during PIE or build. Picture is our implementation of the material.

We have confirmed that this is unrelated to the textures used, nor the sub widgets within the retainer box. What else can we do to solve this problem?

[Attachment Removed]

Steps to Reproduce

  1. Implement Retainer Box > Scale Box > Vertical Box > Images
  2. Apply material
  3. Zoom in/out / resize window
    [Attachment Removed]

Hi Jonathan,

The behavior you are observing is expected due to a limitation associated with how the Retainer Box is implemented internally. The widget works by first rendering its children into an off-screen texture (render target), and then drawing that texture back on the screen. This is what allows its contents to be “retained” and updated less frequently than the rest of the UI, while also giving the chance to apply an effect material during the final drawing.

The problem is that UE must allocate a render target large enough to cover the entire size of the Retainer Box in pixels on the screen, including parts of it that might be clipped from the viewport. When we zoom in too much on the widget, the required render target size can become larger than the maximum limit imposed by the graphics hardware and/or driver (16384×16384 on my system). As a result, the widget is rendered normally, which does not allow the Effect Material to be applied.

Unfortunately, we should generally not use an Effect Material on a Retainer Box that might be viewed with an arbitrarily large size on the screen.

That said, for your specific use case, there might be a simpler way to achieve the desired effect. If the intent is to simply draw a set of textures with a material that affects their colors, you can do it with the Image widget directly by using a Material as the Brush instead of a Texture (remember to use the “User Interface” domain). Let me know if that works for you!

Best regards,

Vitor

[Attachment Removed]

Hi Vitor,

Thanks for getting back to me on this! I suppose the key problem we needed to solve was the major size for the retainer box, so we moved the retainer box to encompass the scroll box instead, which is always a fixed size. This solved the issue, thank you!

[Attachment Removed]