The shadow is not in transparency if opacity texture gets alpha from RGB

Hey, guys.

I found the PR [Engine] Add a flag to use opacity instead of diffuse texture for transparent shadows. by carolhmj · Pull Request #12390 · BabylonJS/Babylon.js · GitHub.
And for the texture that has alpha channel sets useOpacityTextureForTransparentShadow = true , transparency shadow works perfectly.

But If I changed a texture that has no alpha channel sets getAlphaFromRGB = true, it’s not working.

1 Like

Support getAlphaFromRGB in transparent shadow maps by sebavan · Pull Request #15342 · BabylonJS/Babylon.js · GitHub should add it

1 Like

Thx for your work, I’ll pay attention to the latest version release!!!

1 Like

:vulcan_salute: The Opacity texture getAlphaFromRGB = true already works. :vulcan_salute:

And I have another confusion about the tranparent shadow, if I have two meshes, the one has diffuse alpha and the other has opacity alpha. I know create two shadow generator will make this works. Is there any possibility to support with just one shadow generator?

not at the moment, and I guess this would be a breaking change maybe you could PR a new mode ?

OK, thank you very much for your reply. I will try to add this feature.