I am not sure what you mean about clamp not doing what you are trying to achieve. It does exactly what it says it should do. It doesn’t select a range, it clamps the output to be within the specified min/max.
If you have a black pixel next to a white pixel, when texture filtering is applied that means you actually have a gradient going from 0 to 1.0 that happens across the width of 1 pixel. So the borders of your white pixels have all other values surrounding them automatically. So that edge contains your 0.25 as well as your 0.5 value. The only way to disable that is to disable texture filtering which means your pixels will be hard squares.
Manual filtering doesn’t require programming but does require advanced material usage. I don’t want to go through the crazy long steps to suggest how to do it when you haven’t replied to my other much easier suggestions like channel packing.
To disable texture filtering you go into the texture properties in UE4 and change it from “default” to “Nearest”.
You did not respond on my channel packing suggestion. Is there some reason you have to do it this way rather than using a different color channel for each image? Again I do not see the point in using color textures that have all grey values and not leverage channel packing which solves all your problems. The only limitation would be 4 stamps per texture.
“I am sure there is a math way of achieving of only getting one intensity out of the red channel.”
Yes but with texture filtering, ALL the values are actually there, just in a small border.