Summary
Rough refraction destroys the scene-capture alpha channel
Summary
With Substrate and Alpha Output enabled, a translucent material that uses the Index of Refraction refraction method writes an alpha of 1.0 (“nothing here”) into scene colour when it is rendered through a SceneCaptureComponent2D. The object disappears completely from the captured alpha, so it cannot be composited. r.Refraction.Blur 0 avoids the problem.
What Type of Bug are you experiencing?
Rendering (Graphics / Niagara)
Steps to Reproduce
- Create a project with the next settings:
r.PostProcessing.PropagateAlpha=True(Alpha Output)r.Substrate=Truer.Substrate.OpaqueMaterialRoughRefraction=Truer.Refraction.Blur=1
- Create a Substrate material. Set Blend Mode to
Translucent. Set Refraction Method toIndex of Refraction. Set the refraction value to 0.7 and Opacity to 0.7. - Place a cube with that material in front of opaque geometry, for example a landscape.
- Place a
SceneCapture2Dthat frames the cube against the opaque geometry. - Set its Capture Source to
Final Tone Curve HDR, and its render target to an RGBA8 target. - Capture the scene and check the alpha channel of the render target.
Expected Result
The cube has a wrong Alpha (fully transparent) in the SceneCapture render target.
Observed Result
The alpha of the cube’s pixels is 1.0, which means “no coverage”. When the render is composited over another background, the cube and the geometry behind it both disappear.
Affects Versions
5.8
5.7
Platform(s)
Windows
Upload an image
Additional Notes
The fault is already present in Scene Color HDR, before post-processing. Post-processing, the capture source and the tonemapper are therefore not involved.
The following make no difference. Each one was measured:
- Anti-aliasing method (TSR, FXAA, none)
r.Translucency.StandardSeparatedr.SeparateTranslucencyr.Refraction.Blur.TemporalAAr.Refraction.OffsetQuality- Render resolution (480x270 and 1920x1080)
bAlwaysPersistRenderingStateon the capture component- Primitive alpha holdout (
r.Deferred.SupportPrimitiveAlphaHoldoutis off in all tests)
A primary view that renders the same frame reports the material’s transmittance in the alpha instead
of 1.0, so the fault appears to be specific to the scene-capture path. This part is an observation
from image measurements, not from a GPU capture.
Suspected cause (hypothesis, not verified with a GPU capture)
DistortionRendering.cpp:560 creates the rough-refraction scene-colour mip chain with the format
PF_FloatR11G11B10, which has no alpha channel:
FRDGTextureDesc SceneColorMipchainDesc = FRDGTextureDesc::Create2D(
SceneColorMip0Resolution, PF_FloatR11G11B10, FClearValueBinding::None, ...);
The distortion Apply pass binds that texture as SceneColorTexture
(DistortionRendering.cpp:897-898) and samples it (DistortApplyScreenPS.usf:173). A sample from a
texture without an alpha channel returns alpha 1. The Merge pass then writes the result, alpha
included, into scene colour.

