I'm trying to work out a way to generate a mask based on a color ID texture in the material editor (not the compositor). What I'm trying to achieve is have a node group I can re-use which has two parameters, the first parameter is the color ID texture and the second parameter is the color from the texture I want to generate a mask from.
I've included an illustration:
I got it working for some colors (such as red, green, or blue) but it didn't work in all cases, I also had a problem where the mask would show up properly when previewing it through an emissive shader but wouldn't show up when viewed through a normal diffuse shader.
Thank you for your time.