Depth Packing & Point Light Shadowing

Description of the problem:

Hello!

I just wrote a billboard shader to make my own BufferGeometry particle system, for simulating vegetation. It all worked fine, until i enabled customDepthMaterials, enabling my geometry to cast shadows from textures.

The issue is:

While THREE.DirectionalLight works just fine, by casting the silhouette of the texture to the ground, THREE.PointLight won’t react to depth packing the same way, casting just solid square shadows.

Live code:

Here is my fiddle depicting the problem.

Screenshot:

I’ve tried reproducing my problem, using the cloth example, by swapping the directional light by a point light, but the results were the same, a dark square being cast on the floor (instead of the half transparent, labyrinth like, cloth texture).

Shouldn’t every light source be able to cast shadows from customDepthMaterials? If not, i guess it could be taken as a suggestion, or am i missing something?

It’s my first time posting on a forum, please excuse me for any mistakes.
A big Thank You in advance!

Three.js version
  • Dev
  • r85
  • r80
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

Author: Fantashit

1 thought on “Depth Packing & Point Light Shadowing

Comments are closed.