I’ve had trouble getting good results replacing the tone-mapper. I think the engine must do something a bit more sophisticated than a direct lookup when it does the HDR->LDR compression (maybe working in light at the same time?).
At any rate, I’ve been having much better luck skipping the LUTs and just using parameters for transforms. I’ve got a reasonable setup to change smoothly between near and far settings for per-channel black, grey, and white points, and level adjustments for colors:
The per-channel black, grey, white adjustments look like this:
I think the 3-point levels node is doing something similar, but I haven’t gotten it to behave the way I expect, so I just do a simple version of the math as above.
The whole material ends up being pretty cheap (102 base instructions, 29 vertex instructions, 1/16 texture samplers) and it gives me the control I need, so I’m happy enough.
Using the multiple lerp node, this would be trivial to extend to three or four settings, and to save instructions you could pull out the color mapping and just multiply by a single color for most purposes.
For really complicated remaps over depth, you could bring in a texture with all your settings mapped to gradients (e.g., a gradient for black point, for gray point, for white point, etc.) and use UVs to read out. That would start to rack up texture samplers though, and I can’t really think of a setting where you’d need more than a few changes over depth…

