Previews in Material Nodes always black (UE5.6 Substrate Enabled)

Summary

Previews in Material Nodes (e.g. TextureSampleParameter2D) are always black when Substrate is enabled. When Substrate is disabled, the previews show up as expected. This was tested with Unreal Engine 5.6 (from the Epic Games Launcher) using ContentExamples where Substrate Materials are very well showcased.

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

Assets

Steps to Reproduce

Open ContentExamples Project (or any other which uses Substrate Materials)
Enable Substrate (Restart Unreal Editor if requested)
Open any Material (e.g. 3ColorBlend)

Expected Result

Previews in Material Nodes

Observed Result

Previewing the Node in the Preview Window (usually top left corner) works. But the Preview in each Material Node (e.g. InputAlpha (Scalar) is black.

Platform(s)

Windows (Latest)

Upload an image


Additional Notes

Raytracing, Nanite, Substrate is enabled. SM6, DirectX12.
Following Logs may be relevant:
LogObj: Display: Attempting to load config data for Default__SlateThemeManager before the Class has been constructed/registered/linked (likely during module loading or early startup). This will result in the load silently failing and should be fixed.
LogWindows: Failed to load ‘WinPixGpuCapturer.dll’ (GetLastError=126)
PixWinPlugin: PIX capture plugin failed to initialize! Check that the process is launched from PIX.
LogSlateStyle: Warning: Missing Resource from ‘CoreStyle’ Style: ‘Unable to find Color ‘DefaultForeground’.’
LogD3D12RHI: Creating RTPSO with 217 shaders (0 cached, 16 new) took 13.12 ms. Compile time 10.85 ms, link time 2.23 ms.
LogRenderer: Using fallback RTPSO
LogSlate: External Image Picker: DecompressImage failed

For anyone still having this issue in 5.6 - Unreal released a patch on their development branch on July 28th.

In HLSLMaterialTranslator.cpp, ln 1759 - just change from

if (!bSubstrateEnabled || !bUseRootNodeToSubstrateHiddenConversion

to

if (!bSubstrateEnabled || !bUseRootNodeToSubstrateHiddenConversion
|| GetSubstrateMaterialExportType() != ESubstrateMaterialExport::SME_None) // Needed for material preview on node or any other export.

The SME_None check is apparently missing in the release.

I confirmed it works on my own build with substrate. It takes images a few seconds to appear (for me it did anyway), so don’t worry if the nodes still appear black, they’ll update to the correct appearance.