Skip to content

Commit

Permalink
fix: tree skylighting darkness (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlum authored Sep 24, 2024
1 parent 62d9e91 commit 6fca639
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,13 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
# if defined(SOFT_LIGHTING) || defined(BACK_LIGHTING) || defined(RIM_LIGHTING)
if (dirLightAngle > 0.0)
# endif
{
dirDetailShadow = ScreenSpaceShadows::GetScreenSpaceShadow(input.Position, screenUV, screenNoise, viewPosition, eyeIndex);
# if defined(TREE_ANIM)
PerGeometry sD = SharedPerShadow[0];
dirDetailShadow = lerp(1.0, dirDetailShadow, saturate(viewPosition.z / sqrt(sD.ShadowLightParam.z)));
# endif
}
# endif

# if defined(EMAT) && (defined(SKINNED) || !defined(MODELSPACENORMALS))
Expand Down Expand Up @@ -2358,6 +2364,8 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace

# if defined(HAIR)
float3 vertexColor = lerp(1, TintColor.xyz, input.Color.y);
# elif defined(TREE_ANIM) && defined(SKYLIGHTING)
float3 vertexColor = 1.0;
# else
float3 vertexColor = input.Color.xyz;
# endif // defined (HAIR)
Expand Down

0 comments on commit 6fca639

Please sign in to comment.