There’s a whole section about this in After Effects Help:
“How render order and collapsed transformations affect 3D layers”
Here’s an excerpt:
“The positions of certain kinds of layers in the layer stacking order in the Timeline panel prevent groups of 3D layers from being processed together to determine intersections and shadows. A shadow cast by a 3D layer does not affect a 2D layer or any layer that is on the other side of the 2D layer in the layer stacking order. Similarly, a 3D layer does not intersect with a 2D layer or any layer that is on the other side of the 2D layer in the layer stacking order. No such restriction exists for lights.
Just like 2D layers, other types of layers also prevent 3D layers on either side from intersecting or casting shadows on one another:
* An adjustment layer
* A 3D layer with a layer style applied
* A 3D precomposition layer to which an effect, closed mask (with mask mode other than None), or track matte has been applied
* A 3D precomposition layer without collapsed transformations”
———————————————————————————————————
Todd Kopriva, Adobe Systems Incorporated
putting the ‘T’ back in ‘RTFM’ : After Effects Help on the Web
———————————————————————————————————