Cascaded shadows on flipped mesh

Hello everyone,

in my scene I put several meshes into a transformNode to transform them all at once. I flip some transformNodes by scaling the x axis by -1. I noticed that artifacts appear on the meshes of the flipped transformNode if I use cascaded shadows.

This are two meshes side by side:

You can see that the left mesh has has visible lines on it. It is definitely caused by flipping it.

Any idea how to avoid this?

const shadowGenerator = new CascadedShadowGenerator(1024, light)
shadowGenerator.bias = .01
shadowGenerator.normalBias = 0
shadowGenerator.numCascades = 2
shadowGenerator.lambda = 0
shadowGenerator.cascadeBlendPercentage = 0
shadowGenerator.stabilizeCascades = false
shadowGenerator.autoCalcDepthBounds = false


adding @Evgeni_Popov

Here’s the PR (it’s not a problem specific to CSM but to shadow generators):