Multi objects with alpha map error

Description of the problem

When more than one object in a scene with alpha map(expecting to get tranparent effect), if those objects’ meshes chris-cross, or overlap, or stacking(doesnt matter if thoes meshes physically touching or not touching), found the tranparent effect errors, e.g. like the attached file, the leaves are partially missing or diffuse map showing background color in some view angles.

Expected effect:
image

Correct effect:
image

In current three.js editor, I get the result as below.
image
image

Three.js version
  • Dev
  • r89
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 “Multi objects with alpha map error

  1. What you are seeing is a WebGL issue, not a three.js issue. Try

    material.alphaTest = 0.5;
    material.transparent = false;

Comments are closed.