jnsmalm / pixi3d

The 3D renderer for PixiJS. Seamless integration with 2D applications.
https://pixi3d.org
MIT License
752 stars 43 forks source link

can't have multiple lights for shadows? #142

Closed oibrah3q closed 1 year ago

oibrah3q commented 1 year ago

I've tried just about everything, but it looks like only one ShadowCastingLight can be enabled at a time. I've tried omitting the light from enableShadows and just include the mesh, thinking that if I included the light argument it would only generate shadows for that specific light, but it appears to do nothing at all. The documentation states that the second argument is optional. I've tried creating a shadow render pass and using addShadowCastingLight, I was able to see that I've added the render pass to the mesh, but I'm not sure if it calls. I tried brute force adding the shadow render pass to the main renderer's pipeline passes, but it looks like the shadow render pass that's created from ShadowRenderPass() uses version 300 shader code as opposed to the version 100 that the default shadow render pass is built with, and then causes an error.

Is it possible to have multiple shadow casting lights? I would appreciate any help on this, thank you.

jnsmalm commented 1 year ago

Standard material only supports a single light with shadows at the moment.