Optionally expose shadowing to post-processing shaders
Post-processing shaders currently have no way of knowing whether a given point in 3d space is in shadow or not. This makes it so that things like:
- illuminated volumetric fog
- godrays/sunshafts
- water with sun specularity or underwater volumetrics
in post-processing shaders have to use screen-space hacks to determine how lit-up a given point should be (the case for godrays/sunshafts), or just not support it at all (water, volumetric fog). This is not ideal; shaders should be able to opt-in to having access to shadow data. The API should be a single function taking a vec3 and returning a float, because shaders will want to sample points at arbitrary offsets from what they're actually rendering, but access to individual cascades is not useful (and giving access to them would present API stability problems if we ever switch to a different shadowing system).