Sign in to follow this  
Scantron

What EXACTLY does the "Xor" blending mode do?

Recommended Posts

The official documentation on this mode is frustratingly vague:

Thing is, I do personally use it to make art. I think if I knew what exactly it did, I could more easily create images that have eye-pleasing results when blended together using xor.

 

Any help or information you can give is appreciated!

Share this post


Link to post
Share on other sites

http://www.mushclient.com/mushclient/mw_blending5.htm#blend33

XOR basically means "x or y, but not both." When the two pixel values being compared are the same, you get 000000 (black), and when they are opposites, you get FFFFFF (white). Things in between vary based on how different the pixel values are from each other.

@Anonymous If you don't have anything useful to say, don't post.

Share this post


Link to post
Share on other sites

As pdnnob told it is and exclusive or operation on bitlevel.

 

So for each bit N in the 24 bit RGB triple

    compositeBitN = layer1BitN ^ layer2BitN  (0^0=0, 1^0=1, 0^1=1, 1^1=0)

Alpha handling is more complex. So I would use opaque layers only.

Share this post


Link to post
Share on other sites

Alpha handling is more complex. So I would use opaque layers only.

 

Alpha is handled the same regardless of blending mode. Only the treatment of the color channels is affected by your choice of blending mode.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this