Problem: When rendering with ray-traced shadows, terrain geometry may exhibit artifacts in the form of incorrect shadows along the boundaries between polygons.
Solution:
In most cases the shadow artifacts are caused by incorrect traced ray intersections. There are two solutions:
1.) The best solution is to increase the shadow blur setting in the light to at least 0.005. In most cases that will completely eliminate the problem. (See below for why this works.)
2.) Increase the shadow bias, either in the light shader or using the trace bias attribute:
Attribute "trace" "bias" 2
For Massive scenes start with a bias of around 2 and keep increasing until the lines disappear.
Why Increasing Blur Eliminates Artifacts
When shadow blur is less than 0.005, AIR antialiases shadows by distributing shadow sample positions over the area being shaded. Near polygon edges some of those positions can wind up "behind" neighboring polygons with respect to the light source. This is more likely to happen with a coarse polygon representation.
When shadow blur is 0.005 or greater, AIR antialiases shadows by varying the ray direction from the sample position over the cone angle defined by the blur value only. The sample position is fixed at the current shading point.