Add to the project.xml tha flags to enable depth and stencil tests.
Now works in mobile, desktop and js.