I’m working on a material and I’ve got a result that I quite like in material preview, but when I bake it out I end up getting a different result than what material preview was showing.
As best as I can tell, it looks like Eevee is calculating the Hue blend differently than Cycles does, but I can’t figure out why.
Looking at the Blender source code, the Hue blend of the color mix node checks if the Saturation doesn’t equal zero, and if it does just returns the base color unchanged, which is what I’m getting from Cycles. But Eevee is giving me something different, which doesn’t make any sense (maybe Eevee is doing the float to RGB conversion differently, but I can’t find where in the Eevee source code the blends and converts happen).
Here’s what I’m getting from Eevee:
And here’s what I’m getting from Cycles:
And here’s my node setup:
If anyone has ideas how I can get the Eevee result in Cycles, I’d be grateful. The closest I’ve been able to get is manually doing the hue replace, and then vector math reflect of the resulting color against the original, but it’s still not quite right as there’s a lot more green in that result.