I sample the shadow map using GL_LINEAR filter, if I use GL_NEAREST, the shadow edge will be filkering when I move the camera.
Then implement PCF or do as Hodgman said and use a comparison sampler etc.
If what you have now is just a regular sampler with GL_LINEAR, then what you have now is a bug. Using GL_LINEAR to solve jagged shadow edges etc. is not a solution—it’s just hiding the problem under some soft artifacts.
In fact, it is also the reason you have this artifact in this topic. You read to the edge of the texture, your GL_LINEAR filter tries to sample off the edge of the texture, there is no data there, so the shadow starts to blend to white (lack of shadow = presence of light).
If you were using GL_NEAREST then you could read to the edge of the first cascade before switching to the next one without having this light leak.
why do you think the cascades still may not overlap. I still don't get it.
The image of the teapot can be in all 3 cascades. That’s not what overlapping means.
Cascades only overlap if you sample more than one at a time and blend between them. Hence, they overlap. If your shader is picking only one-or-the-other, then by definition they can’t be overlapping.
Anyway, it is mainly to eliminate another artifact: Sudden changes in shadow density. It might mask this current problem, but it would actually be another case of sweeping a bug under a rug.
L. Spiro