Where are the directional light CSM sampling shader function(s)?

I’m attempting to modify the directional light shadow, specifically to introduce a cross fade between CSM’s:
2250463--150382--upload_2015-8-14_20-1-50.png
(possibly not viable without draw overlap, but I wanted to give it a quick try)

And also a near-test fade to reduce this issue where the bias starts:
2250463--150381--upload_2015-8-14_20-1-7.png

Both pretty easy vanilla tasks to do, however I can’t for the life of me find where this is done. It seems to reference _ShadowMapTexture (a deferred shadow pass in Internal-DeferredShading), but I can’t seem to find where this gets written to. At first I thought it was shared with Internal-PrePassCollectShadows, but nothing I do in there seems to hit it.

Any help appreciated!

Bah, scratch that - it IS in the Internal-PrePassCollectShadows, however there seems to be some linking issues every now and then which prevents changes being recompiled – every time this occurs, a restart of the editor fixes the issue until it occurs again.

I’ve got problem B solved (the near test bias), but as expected the split’s are getting in the way of the crossfade across CSM’s – I have it working to a certain degree, but it’s not viable to fully fix without access to source.

From here I’ll probably diverge, I’ll rewrite directional shadowing and just use faceted shadow maps ala ShaderX7 | Real-Time Rendering