ShadowMesh bug when using fog

Description of the problem

The shadow color changed when use a fog. we have set fog = false in ShadowMesh. like this:

  var shadowMaterial = new THREE.MeshBasicMaterial( {

    color: 0x606060,
    transparent: true,                                                                      
    opacity: 0.6,                                                                           
    depthWrite: false,                                                                       
    fog: false                                                                              
  } ); 
Three.js version
  • Dev
  • r104
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Author: Fantashit

1 thought on “ShadowMesh bug when using fog

  1. Setting this in your example looks best, I guess:

    shadowCube.material.color.setHex( 0x808080 );
    shadowCube.material.fog = false;

Comments are closed.