You can go an alternate route, and that's to use different value ranges in your emissive mask for different color constants. For example, if you only need two colors, you could have 0.0-0.5 be blue, and 0.5-1.0 be yellow. It's a shitload cleaner in HLSL, lol. If you wanted to do more colors, I'll leave you with a short…