Line of sight effect

It does work for me in 4.2 in the Playground.

You can use the CustomMaterial material if you want to extend the standard material with custom code, as I did in the PG. You can also use a node material created in the NME.

Another possibility is to simply use a ShadowDepthWrapper with any material you write: Custom shadows with ShadowDepthWrapper