0

I have created simple react-three-fiber scene with default renderer and watch gltf model and once i have make it recieveShadow it starts creating line patterns under pointLight

Have you ever encountered similar problem? Is there any workaround?

gltf model with unwanted line patterns created after recieveShadows=true

I tried to cast and recieve shadows in recursive function as my watch model is multidimensional. Shadows casting works perfectly as expected but receiving create mentioned line patterns on model

recursive function for receiving and casting shadows

Thanks in advance for tricks and tips

1 Answers1

0

this where 'bias' parameter should be tweaked:

const SHADOW_MAP_SIZE = 2048;
const SHADOW_MAP_BIAS = -0.000001;

<spotLight
    shadow-mapSize-height={SHADOW_MAP_SIZE}
    shadow-mapSize-width={SHADOW_MAP_SIZE}
    shadow-bias={SHADOW_MAP_BIAS}
    castShadow
/>

not sure why it's negative, however it seems it should go negative shadow.bias = -0.005, reference https://discourse.threejs.org/t/hello-i-am-facing-the-problem-with-shadow-stripes-on-model/18065/9

antokhio
  • 1,497
  • 2
  • 11
  • 16