SSS is affected by Skylight. Shouldn't be

It looks like a bug more and more. Here are two scenarios:

Directional Light

  1. Create abovementioned material with SSS color
  2. Create movable Directional light and look how it influence SSS
  3. Change it to Static/Stationary, build lighting and look how it influence SSS
    It works properly and material get proper SSS intensity during built static light and during movable state

Sky Light

  1. Create abovementioned material with SSS color
  2. Create movable Sky light and look how it influence SSS
  3. Change it to Static/Stationary, build lighting and look how it influence SSS
    Material get proper SSS intensity(NONE) only during built static/stationary light and get full 1.0 value during movable state. So either someone forgot to change value for movable state or by design Directional light contributes to SSS properly in all modes, but Sky light works properly only in half of cases.

Also, I might found relevant bit in SkyLighting.usf which responsible for diffuse lighting in Movable mode. Here is code snippet

if (ShadingModelId == SHADINGMODELID_TWOSIDED_FOLIAGE)
		{
			float3 SubsurfaceLookup = GetSkySHDiffuse(-GBuffer.WorldNormal) * View.SkyLightColor.rgb;
			float3 SubsurfaceColor = ExtractSubsurfaceColor(GBuffer);
			Lighting += ScalarFactors * SubsurfaceLookup * SubsurfaceColor;
		}

		if (ShadingModelId == SHADINGMODELID_SUBSURFACE || ShadingModelId == SHADINGMODELID_PREINTEGRATED_SKIN)
		{
			float3 SubsurfaceColor = ExtractSubsurfaceColor(GBuffer);
			// Add subsurface energy to diffuse
			DiffuseColor += SubsurfaceColor;
		}

As you can see - for two sided foliage some scaling applied, however for subsurface there is no logic, it just pure max color without scaling.

1 Like