In UI materials, the presence of a SetMaterialAttributes node or function with WPO causes the material to turn black.

Hello everyone,

I’ve encountered a persistent and frustrating issue regarding the SetMaterialAttributes node when working across different Material Domains, specifically when moving from Surface to User Interface. I have already submitted a bug report, but I wanted to share this here and see if anyone has better workarounds.

The Issue:
The SetMaterialAttributes node does not automatically update or filter its exposed pins when the Material Domain is changed, or when the node is copy-pasted from a Surface material into a UI material.

It retains unsupported pins (such as World Position Offset or Emissive Color). If you connect any node to these lingering unsupported pins, the material shader fails silently—the preview turns completely black, and no compiler errors are thrown, even if the SetMaterialAttributes node is completely disconnected from the final material output.

Steps to Reproduce:

  1. Create a new Material and add a SetMaterialAttributes node (observe default Surface pins like WPO).
  2. Change the Material Domain to User Interface.
  3. Notice the node fails to update; it still shows WPO instead of UI pins (like Screen Position).
  4. Connect a Constant 0 to the WPO pin.
  5. Result: The material preview immediately turns black.

Interesting Note: If you copy (Ctrl+C) and paste (Ctrl+V) this broken node within the same UI material, the newly instantiated node correctly initializes with the proper UI pins.

The Impact:
This becomes a major headache when using Material Functions. If a generic Material Function contains a SetMaterialAttributes node with Surface attributes, dropping it into a UI material causes a silent black-screen failure with no indication of where the error is.

I spent quite a lot of effort pinpointing the issue — it turned out to be buried deep inside a material function. As shown in the image, the entire node doesn’t even need to be connected.