Hellow again RyanB,
after working with your formula i saw that is bad. If we want a grayscale from 96 to 128 it takes the values from 96 to 256. Then we need to subtract. =more compiling shaders time.
I discovered a clean way to extract exact grays from images , but not ranges.
Here the material itself.