Description

The output of the CustomStencil node in a User Interface material does not align with the viewport dimensions. Toggling fullscreen/windowed mode (F11) causes the offset to reappear, so scaling the node’s UVs in various ways has no effect.

In Standalone mode, the issue isn’t present initially, but resizing the viewport via F11 also produces the misalignment. Even using the r.The ScreenPercentage console command does not output the aligned.

 

 

We found a similar UDN case suggesting this UV issue was fixed in 5.4. 

[link noted below]

However, testing the Launcher’s UE5.4 build still reproduces the above problem, same as in 5.5.

 

Steps to Reproduce

 

  1. Create a new Unreal Engine 5.5 sample project.
  2. In Project Settings → Engine → Rendering → Postprocessing → Custom Depth­Stencil Pass, set to Enabled with Stencil.
  3. Create a new material:
    1. Material Domain: User Interface
    2. Blend Mode: Additive (the issue also reproduces with Translucent)
    3. Add a SceneTexture node and select CustomStencil
  4. Create a UserWidget:
    1. Add an Image widget under a Canvas Panel
    2. Assign the material from step 3 to the Image’s Brush → Image
  5. In your Level Blueprint, create the widget and add to Viewport in BeginPlay event.
  6. Play the game and observe that the CustomStencil output on the Image widget is offset from the actual stencil mask on screen.

 

Result: The size of the CustomStencil shown in the Image widget does not match the size of the actual viewport.

Expected: The CustomStencil node in a UMG material should accurately sample the stencil buffer regardless of widget size, position, or viewport changes

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-282972 in the post.

0
Login to Vote

Unresolved
ComponentUE - Graphics Features
Affects Versions5.5
Target Fix5.7
CreatedMay 19, 2025
UpdatedMay 26, 2025
View Jira Issue