How can I alter the intensity of a shadow cast by an object in the three.js? Currently translucent materials cast a shadow as intense as opaque objects. Obviously I'd like the translucent ones to not cast such an intense shadow.
When casting shadows in three.js using WebGLRenderer
, objects are treated as solid and non-translucent from the point of view of the light.
You can control the shadow intensity on a per-light basis by setting light.shadowDarkness
to a value in the range [ 0, 1 ].
three.js r.64
EDIT: light.shadowDarkness
is no longer supported as of three.js r.74. You can add ambient light to your scene to compensate.
three.js r.75
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With