How to enable shadows for points (particles)? #2391
Answered
by
RvanderLaan
RvanderLaan
asked this question in
Q&A
-
Getting points to cast shadows has had some issues in ThreeJS itself: I came across this issue mrdoob/three.js#13749 Though it appears to work fine nowadays like in this fiddle posted in there http://jsfiddle.net/p61u2cm9/3/ I recreated a similar setup with react-three-fiber but the points do not cast shadows https://codesandbox.io/s/lively-fast-wh0q5r?file=/src/App.tsx Am I doing something wrong? Or might there be a bug in this project? |
Beta Was this translation helpful? Give feedback.
Answered by
RvanderLaan
Aug 3, 2022
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
RvanderLaan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured it out: it does work, but the shadows cast by the points do not scale with the size assigned to the points. With a much denser set of points of size 1, the shadows do appear:
It looks like it should be possible to scale them with a custom depth material. Otherwise, using instanced quads might be more suitable for this purpose