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 )
|
if( Shadow.SurfaceShadow + Shadow.TransmissionShadow > 0 )
|
||||||
{
|
{
|
||||||
const bool bNeedsSeparateSubsurfaceLightAccumulation = UseSubsurfaceProfile(GBuffer.ShadingModelID);//判断是否需要SubsurfaceProfile计算
|
const bool bNeedsSeparateSubsurfaceLightAccumulation = UseSubsurfaceProfile(GBuffer.ShadingModelID);//判断是否需要SubsurfaceProfile计算
|
||||||
|
#if NON_DIRECTIONAL_DIRECT_LIGHTING // 非平行直接光
|
||||||
#if NON_DIRECTIONAL_DIRECT_LIGHTING
|
|
||||||
float Lighting;
|
float Lighting;
|
||||||
|
if( LightData.bRectLight )//面光源
|
||||||
if( LightData.bRectLight )
|
|
||||||
{
|
{
|
||||||
FRect Rect = GetRect( ToLight, LightData );
|
FRect Rect = GetRect( ToLight, LightData );
|
||||||
|
|
||||||
Lighting = IntegrateLight( Rect );
|
Lighting = IntegrateLight( Rect );
|
||||||
}
|
}
|
||||||
else
|
else //点光源以及胶囊光源
|
||||||
{
|
{
|
||||||
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
||||||
|
|
||||||
Lighting = IntegrateLight( Capsule, LightData.bInverseSquared );
|
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);
|
LightAccumulator_AddSplit(LightAccumulator, LightingDiffuse, 0.0f, 0, MaskedLightColor * Shadow.SurfaceShadow, bNeedsSeparateSubsurfaceLightAccumulation);
|
||||||
#else
|
#else
|
||||||
FDirectLighting Lighting;
|
FDirectLighting Lighting;
|
||||||
|
if (LightData.bRectLight)//面光源
|
||||||
if (LightData.bRectLight)
|
|
||||||
{
|
{
|
||||||
FRect Rect = GetRect( ToLight, LightData );
|
FRect Rect = GetRect( ToLight, LightData );
|
||||||
const FRectTexture SourceTexture = ConvertToRectTexture(LightData);
|
const FRectTexture SourceTexture = ConvertToRectTexture(LightData);
|
||||||
@ -665,7 +660,7 @@ FLightAccumulator AccumulateDynamicLighting(
|
|||||||
Lighting = IntegrateBxDF( GBuffer, N, V, Rect, Shadow, SourceTexture);
|
Lighting = IntegrateBxDF( GBuffer, N, V, Rect, Shadow, SourceTexture);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else //点光源以及胶囊光源
|
||||||
{
|
{
|
||||||
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
FCapsuleLight Capsule = GetCapsule( ToLight, LightData );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user