Not sure whether there already is a way to do this or it would need to be added, but: I’m trying to customise the shadows cast onto my material. In my concrete example that would mean clamping the darkest a color can get. From what I understood, the only way to get even remotely close to this is overriding the whole PostShadow pass for my material and calculate all the object colors in there again for each pixel, then calculate shadow, blend and apply the clamping. That’s an awful lot of calculating what has already been calculated.
Now imagine your main material shader would already get the per fragment shadow information as a global uniform (something like g_LightColor or the others) and could use it to calculate the final lighting. That way a shader writer could have all the control over how the shadows are blended and how they end up looking. This would probably move the whole shadowing process from being a post frame to a pre main frame process. Is all of this a good idea? Why (not)? How would one go around to implementing it?