Accessing SceneColor in HLSL in Surface Material Domain

mae!!
Sat, 07 Sep 2024 22:09:24 +0000
Rendering

Hiii!!
For a shader I’m setting up, I need to sample SceneColor through HLSL in a Custom Expression. I am doing this in a translucent surface material, not in a post-process material. I am offsetting the UVs that are used to sample the SceneColor in a for-loop, so using a SceneColor node as an input variable is not an option.
However, I have been unable to find an HLSL function that samples SceneColor without using SceneTexture - which I can’t use as it’s not a post-process material.
I’ve tried using CalcSceneColor, but this function does not appear to be working - at least not in UE5.4.4.

I’d love to know if anybody knows of a way to access SceneColor at a given UV coordinate in HLSL.

3 posts - 3 participants