Displaying text / images within an item's bounds?

This is a cross post from here: Displaying text / images within an item's bounds? - Blueprint Visual Scripting - Unreal Engine Forums since I’m not sure which forum this would be more suitable in.

This is a difficult one I think, I doubt it’s possible. I have a dialog system where text is displayed inside a floating rectangle (no widgets) and I need to be able to scroll up and down without the text breaking the confines of the box.

Is there any way to graphically cull the contents of the box (any text / images it may contain) so that they always appear to stay within the rectangle?

Edit: sort of like Photoshop’s clipping mask feature.

Edit 2: Is there any kind of method for making things visible only when it has passed through transparency, or other similar tricks? In offline renderers, there’s usually options like “only visible through refraction”, something like this or any other methods similar might work to achieve the effect I’m after. This way, the text / items could be placed behind an invisible translucent object that is the size of my bounding box.

I have this working now with the Scene Depth node, and it works perfectly as long as the rectangle is an opaque material or masked at 1. Is there any way to have an invisible object render in the scene depth pass? This trick does not seem to work any more.

Edir: resolved =D