Getting shadows to work in Three.js custom shader

前端 未结 1 1980
野性不改
野性不改 2021-01-18 22:12

I\'m trying to get shadows to work in a custom shader in Three.js. I\'ve tried to add these into my codes:

In uniforms:

THREE.UniformsLib[\"shadowmap         


        
相关标签:
1条回答
  • 2021-01-18 22:47

    I believe that you need to mark each object as casting and receiving shadows

    I think its just

    obj.castShadow = true;
    obj.recieveShadow = true;
    
    0 讨论(0)
提交回复
热议问题