I have rendered two cubes with custom data. One I have drawn with TriangleStripDrawMode and other with TriangleFillMode.
The shadow generated for the cube with TriangleStripDrawMode is not proper.
The shadow generated for the cube with TriangleFillMode is proper.
In shadowGenerator.ts file,
Inside private _renderSubMeshForShadowMap () method,
mesh._processRendering(subMesh, this._effect, Material.TriangleFillMode, batch, hardwareInstancedRendering,
(isInstance, world) => this._effect.setMatrix(“world”, world));
Here, the value Material.TriangleFillMode is hardcoded. Instead, it has to be obtained from the particular mesh’s fillMode.