A question about Scene Depth node in post process material

In the post process material blueprint, what’s the difference between Scene Depth node and SceneTexture:SceneDepth node? or are they actually the same thing?

SceneTexture:SceneDepth outputs a color value consisting of 4 components, as described in documents, and which specific channel value can be used as a depth value, or all of 4 can be used?

What I want to do is to replace the alpha channel of a capture2d’s rendering result texture with depth value. I’m not sure how to do it correctly. My post process material graph looks like below.

In returned values there seems to be no difference. However using the SceneDepth node costs 1 instructions more than the SceneTexture node. In the compiled HLSL code the former case looks like this:


while the latter is

SceneTextureLookup(GetDefaultSceneTextureUV(Parameters, 1), 1, false);

The CalcSceneDepth() function is in Common.usf if you want to dig deeper.

In any case, all channels store the same float value so you can use any of them.

Thanks ZoltanE