vault backup: 2025-02-13 17:57:50
This commit is contained in:
parent
bbb24c48d0
commit
8025c73f1e
@ -632,29 +632,24 @@ FLightAccumulator AccumulateDynamicLighting(
|
||||
if( Shadow.SurfaceShadow + Shadow.TransmissionShadow > 0 )
|
||||
{
|
||||
const bool bNeedsSeparateSubsurfaceLightAccumulation = UseSubsurfaceProfile(GBuffer.ShadingModelID);//判断是否需要SubsurfaceProfile计算
|
||||
|
||||
#if NON_DIRECTIONAL_DIRECT_LIGHTING
|
||||
#if NON_DIRECTIONAL_DIRECT_LIGHTING // 非平行直接光
|
||||
float Lighting;
|
||||
|
||||
if( LightData.bRectLight )
|
||||
if( LightData.bRectLight )//面光源
|
||||
{
|
||||
FRect Rect = GetRect( ToLight, LightData );
|
||||
|
||||
Lighting = IntegrateLight( Rect );
|
||||
}
|
||||
else
|
||||
else //点光源以及胶囊光源
|
||||
{
|
||||
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
||||
|
||||
Lighting = IntegrateLight( Capsule, LightData.bInverseSquared );
|
||||
}
|
||||
|
||||
float3 LightingDiffuse = Diffuse_Lambert( GBuffer.DiffuseColor ) * Lighting;
|
||||
float3 LightingDiffuse = Diffuse_Lambert( GBuffer.DiffuseColor ) * Lighting;//Lambert照明 * 积分结果
|
||||
LightAccumulator_AddSplit(LightAccumulator, LightingDiffuse, 0.0f, 0, MaskedLightColor * Shadow.SurfaceShadow, bNeedsSeparateSubsurfaceLightAccumulation);
|
||||
#else
|
||||
FDirectLighting Lighting;
|
||||
|
||||
if (LightData.bRectLight)
|
||||
if (LightData.bRectLight)//面光源
|
||||
{
|
||||
FRect Rect = GetRect( ToLight, LightData );
|
||||
const FRectTexture SourceTexture = ConvertToRectTexture(LightData);
|
||||
@ -665,7 +660,7 @@ FLightAccumulator AccumulateDynamicLighting(
|
||||
Lighting = IntegrateBxDF( GBuffer, N, V, Rect, Shadow, SourceTexture);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
else //点光源以及胶囊光源
|
||||
{
|
||||
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user