Missing subsurface scattering with MegaLights Directional Light in 5.7

Hi, we’ve recently enabled:

r.MegaLights.DirectionalLights=1
r.Forward.LightBuffer.Mode=1

to fully be able to use Megalights with directional lights, and hence avoid keeping a VSM around. However, we’ve noticed that we lost SSS on some of our materials. I am aware that 5.8 might have some solutions for this. We currently have locked in our engine version at 5.7, so I’m looking to see if we could be pointed to relevant CLs in 5.8 that could fix SSS for Megalights’ directional lights implementation.

Thank you,

Trung

[Attachment Removed]

Hi, here is a list of CLs that should add full SSS support for MegaLights in 5.8. I categorized the changes, since they are broken up over time, and addressed certain aspects of the implementation:

Foundational support

- CL 38780529: Initial Subsurface + two-sided foliage shading-model support (skip screen traces, reverse normal for backside lighting).

- CL 46774852:Transmission support for Subsurface & Subsurface Profile models; added r.MegaLights.Transmission + per-light flag (GBuffer path).

- CL 50481129: SSS transmission support for Substrate (Format=1).

- CL 54421623: Directional-light per-pixel transmittance support.

SSS pipeline integration (separated-diffuse path)

- CL 51775345: Separated subsurface-diffuse R16F path; MegaLights spatial passes output to it.

- CL 51977852: Store specular luminance in that R16F path to reduce error amplification.

Follow-up fixes

- CL 46930844: Fix 0-transmission making hair/two-sided foliage too dark.

- CL 47039162: Transmission ray distance + SSS light-leak fixes.

- CL 47103937: Fix transmission distance computation (ray biasing).

- CL 47111729: Fix SSS checkerboard brightness + Subsurface Profile BaseColor mismatch.

- CL 47584349: Allow two-sided lighting when light transmission disabled.

- CL 48456800: Disable far-field transmission rays.

- CL 50546711: Fix double-call of GetSubSurfaceTransmission.

Let me know if anything is missing or if you have any follow-up questions.

[Attachment Removed]

You are welcome! I will close out the ticket then, but feel free to file another one if you need more clarification.

[Attachment Removed]

Thank you Tim. The breakup is very helpful. I will start with the foundational support CLs and SSS pipeline integration.

[Attachment Removed]