Description

While attempting to modify the World Align Blend function in order to map decals to a surface based on a world vector input, I discovered the function fails to compile while passing the SceneTexture:WorldNormal input data.

The error message presented states, '[SM5] SceneTexture expressions cannot be used in opaque materials'

The catch here is that the material Blend Mode for the decal has been set to Translucent, and if the SceneTexture:WorldNormal is fed directly into the Base Color of the material, it compiles without error.

It seems like the SceneTexture input data breaks when trying to read the Blend Mode of the material when placed inside a function.

Steps to Reproduce

1. Open attached project.
2. Open the M_WorldAlignDecal material in the Content Browser.
3. Now open the WorldAlignBlend material function.
4. Connect the SceneTexture:WorldNormal to the Input in World Vector (Vector3)

Outcome The material function fails to compile with the error message: [SM5] SceneTexture expressions cannot be used in opaque materials.
Expected Since the decal is set to Translucent, the material function should successfully compile.

Have Comments or More Details?

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

2
Login to Vote

Won't Fix
ComponentUE - Graphics Features
Affects Versions4.15.34.16.24.17
CreatedJul 18, 2017
ResolvedJul 19, 2017
UpdatedJul 14, 2021
View Jira Issue