I wanna to read SceneTexture in a Custom Material Function…but there is always a error say:[SM5] SceneTexture expressions cannot be used in opaque materials…
and , the same question can be find here:
I developed a plugin named “SceneTextureForUMG”, which bakes scene textures so that they can be used for other materials.
I developed the plugin mainly for UMG, but I found your problem also can be solved by the plugin. This plugin bake scene textures to render targets, so you can use them at anywhere you want.