2

I'm using three.js library and I have some problems with my shadows. The problem is that my shadows look quite bad.

For example, the Floor has jerky shadows

And I don't know what to do .. :)

Waiting for your help :D

[EDIT]

An other screenshot to show you my problem.. Here you can see two cubes with bad shadows

Paul-Jan
  • 16,746
  • 1
  • 63
  • 95
sRcBh
  • 286
  • 1
  • 7
  • 24
  • look at the `shadowBias` parameter. http://threejs.org/docs/#Reference/Lights/DirectionalLight – gaitat Oct 07 '15 at 12:27
  • I tried, but it seems nothing goes better.. :/ or should I set a High value for the `shadowBias`? http://i.stack.imgur.com/YsWGM.jpg – sRcBh Oct 07 '15 at 13:02
  • no it should be something like +/- 0.001 – gaitat Oct 07 '15 at 15:01
  • 4
    See http://stackoverflow.com/questions/30799206/stripped-shadows-on-collada-objects/30803087#30803087 and http://stackoverflow.com/questions/32545283/shadow-artifacts-on-double-sided-plane/32546348#32546348 – WestLangley Oct 07 '15 at 15:25
  • Thank you very much, my shadows are way much better ! The problem now is that I haven't any shadows on the floor anymore.. – sRcBh Oct 07 '15 at 15:52

1 Answers1

5

Thank you WestLangley! :)

I have to use

directionalLight.shadowBias = - 0.01;

But shadows aren't on the floor anymore, I will work on it!

sRcBh
  • 286
  • 1
  • 7
  • 24