Lighting and Shadows - WEKIT-ECS/MIRAGE-XR GitHub Wiki
Lighting
There are two lights in the scene:
Directional Light
: This is the above the scene hovering light facing downwardsUserTorchLight
: This is a directional light attached to the camera, so it always points where the user looks
Rendering time is reduced, if non-point lights are used, as only the set direction of the light needs to be evaluated.
Shadows
-
PlaneManager
: the PlaneManager has anARFeatheredPlane
prefab with anARFoundationPlaneBehaviour
component script. This script has now a new shadow material, set toAdditionalDirectionalShadowReceiver
, which uses the shader graph for receiving shadows from the DevDunkStudio package. -
ARFeatheredPlane
prefab: The prefab additionally has a second mesh renderer materialAdditionalDirectionalShadowReceiver
:
-
Light settings: Shadows are configured in the directional light GameObject settings of
UserTorchLight
, setting shadows tohard
. -
URP settings: The
Universal Render Pipeline Asset
prefab has been configured to set theMax Distance
to 7, the smallest value that had a reasonable amount of shadows for the given lighting conditions, with shadow cascades activated.