Skip to content

Commit

Permalink
Fixed shadow distances having a hard limit
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsakharov committed Apr 11, 2024
1 parent 555bc61 commit 2139b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Prowl.Runtime/Components/Lights/DirectionalLight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void UpdateShadowmap()

// Compute the MVP matrix from the light's point of view
//Graphics.MatDepthProjection = Matrix4x4.CreateOrthographicOffCenter(-25, 25, -25, 25, 1, 256);
Graphics.MatDepthProjection = Matrix4x4.CreateOrthographic(shadowDistance, shadowDistance, 0, 100);
Graphics.MatDepthProjection = Matrix4x4.CreateOrthographic(shadowDistance, shadowDistance, 0, shadowDistance);

var forward = GameObject.transform.forward;
Graphics.MatDepthView = Matrix4x4.CreateLookToLeftHanded(-forward * 50, -forward, GameObject.transform.up);
Expand Down

0 comments on commit 2139b2b

Please sign in to comment.