[Bf-cycles] Patch: some modes of material mix node give incorrect results

Brecht Van Lommel brechtvanlommel at pandora.be
Fri May 27 11:32:27 CEST 2011

Hi Sanne,

Thanks again for the patch, committed.


On Wed, May 25, 2011 at 6:49 PM, Sanne <sanne at lavabit.com> wrote:
> Hi,
> I found that some of the modes of the Cycles material mix node don't give the
> same results as the same modes in the compositor.
> The modes are:
> Subtract, Screen, Divide, Difference, Darken, Lighten, Overlay
> It turned out that the order of those mix modes in the NodeMix enum in
> intern/cycles/kernel/svm/svm_types.h is different than the order in
> gpu_shader_mix_rgb in source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c.
> Adapting the order in the the NodeMix enum fixed the issue, although I'm not
> sure if this is the correct way to go about this.
> Here's the patch:
> http://www.pasteall.org/21912/diff
> And here's a blend for checking (top left is compositor, right is material,
> bottom left text block with my test results and notes):
> http://www.pasteall.org/blend/6667
> Thanks,
> Sanne
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles

More information about the Bf-cycles mailing list