Hello everyone,
I'm trying to use decals with a PBRMaterial but can't get past a (apparently normal-related) glitch.
Playground example: http://www.babylonjs-playground.com/#1YDIEU
Click on the cylinder to add a few decals on different sides of the object. Each side behaves differently, as if the normals were the same for all of them.
I tried changing the PickingInfo.getNormal(bool, bool) call unsuccessfully, and even tried to force normals to be recalculated by using Mesh.updateMeshPositions(fn, true), but that didn't help. Granted, it might not even have anything to do with normals.. That's just a guess, supported by the fact that when using a NormalMaterial, decals are plain black.
Now, this may well be my fault and not really a bug, but in that case I'd argue the examples and documentation have a bug!
I appreciate any help. Also, feel free to curse me in case I'm doing something stupid.