I'm working on a new project using Irrlicht Engine. I'm currently experiencing troubles with stencil shadows.

As you can see in the image, shadows are not correctly rendered, but I'm unable to understand the reason.
Normals are ok, and lighting is working perfectly. However, it seems that some faces don't cast shadows, or there's a strange intersection problem.
I hope that there is a chance to fix it. Thank you in advance for replies!!
Best regards