Skip to content
Discussion options

You must be logged in to vote

it does cast, but directionalLight has an extremely small frustum by default (just one unit)

<directionalLight
  castShadow
  position={[5, 5, 5]}
  shadow-camera-far={50}
  shadow-camera-left={-10}
  shadow-camera-right={10}
  shadow-camera-top={10}
  shadow-camera-bottom={-10}
/>

and as of v8 you can attach nested objects

<directionalLight castShadow position={[5, 5, 5]}>
  <orthographicCamera attach="shadow-camera" args={[-10, 10, 10, -10]} />
</directionalLight>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RCopeland
Comment options

Answer selected by RCopeland
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants