Browse Source

Document shadow quality workaround with orthogonal camera in Your first 3D game

This is required for now, as the DirectionalLight3D's Shadow Max Distance
isn't taken into account when using an orthogonal camera.

This is an engine issue, but since this tutorial is a starting point
for a lot of people, it's important to point out a workaround right here.
Hugo Locurcio 2 years ago
parent
commit
c0cdbf0617
1 changed files with 13 additions and 0 deletions
  1. 13 0
      getting_started/first_3d_game/03.player_movement_code.rst

+ 13 - 0
getting_started/first_3d_game/03.player_movement_code.rst

@@ -408,6 +408,19 @@ Select the *Camera* again and in the *Inspector*, set the *Projection* to
 *Orthogonal* and the *Size* to ``19``. The character should now look flatter and
 *Orthogonal* and the *Size* to ``19``. The character should now look flatter and
 the ground should fill the background.
 the ground should fill the background.
 
 
+.. note::
+
+    When using an orthogonal camera in Godot 4, directional shadow quality is
+    dependent on the camera's *Far* value. The higher the *Far* value, the
+    further away the camera will be able to see. However, higher *Far* values
+    also decrease shadow quality as the shadow rendering has to cover a greater
+    distance.
+
+    If directional shadows look too blurry after switching to an orthogonal
+    camera, decrease the camera's *Far* property to a lower value such as
+    ``100``. Don't decrease this *Far* property too much, or objects in the
+    distance will start disappearing.
+
 |image10|
 |image10|
 
 
 Test your scene and you should be able to move in all 8 directions and not glitch through the floor!
 Test your scene and you should be able to move in all 8 directions and not glitch through the floor!