Inaccurate Lerp

Im trying to create mask based on color and use it to lerp different effect into material. My problem is that lerp function is not accurate. If i setup the material as follows :

then the result is

The texture is created in ms-paint(red rectangle[1,0,0] and green[0,1,0] ) and there is no compression, no sRGB, no mipmaps and yet the mask wich should be precise generates pixel wide “border”. Maybe i’m missing something, im do not have much experience with materials, but this seems like a bug to me.

Did anyone encounter similar problem? Is there a fix or work around? I really don’t want to create separate textures with inflated masks just for this…

Try this experiment with plain red from the engine and see what happens…

its not inaccurate, as your texture gets interpolated between pixels when you display it in higher resolution, which is 100% normal GPU does that by default, your rec color slides down at the end in lerps to original image which makes red color leak in to it. I don’t know what exactly you want to do you might want to use “If” node instead of Lerp. Or maybe you should use some real case scenerio what ever oyu trying to do

I’m trying to create interactive map, similar to post here How to Make a Grand-Strategy-like Interactive Map - UE4 AnswerHub. I’m using the region color map to mask the individual zones. I have tried “if” and it does the same thing. Additionally, the mesh is procedurally generated so it matches texture size ratio(there is some multiplicator), so im not sure why there is this interpolation. Is there any way of turning it off??