1. Anders Ruud
  2. love
  3. Issues

Issues

Issue #555 invalid

problem with draw premultiplied BlendMode

Antonio Moder
created an issue

See https://love2d.org/forums/viewtopic.php?f=4&t=14823&p=78036#p78036

Should be scrOver, but draws dstOver: http://3.bp.blogspot.com/_FG1rPg7pY00/SvSxH4npF2I/AAAAAAAAACc/ztcmE9wxvxo/s1600-h/blend_table.png

My video card is intel x3100, i installed latest drivers for video card in windows xp sp3. Tested in Ubuntu 12.04.1 - result like in Windows XP.

Comments (13)

  1. Alex Szpakowski

    I'm not exactly sure what you're reporting with this issue, but LÖVE's premultiplied blend mode is correct as far as I can tell. It calls

    glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

    which translates into this equation:

    finalcolor.rgb = newcolor.rgb + (existingcolor.rgb * (1 - newcolor.a))

  2. Alex Szpakowski

    Why do you think result-correct image is what should be happening? From what I can tell, its alpha values are different from what I would expect if I rendered the two layers on top of each other, so I would think it's incorrect, and the image labelled result-incorrect is in fact correct.

    The alpha values of result-correct are greater than both the values of the result-incorrect image and the values of the two layer images, in places where they don't have full opacity. I have no idea why you would think this is correct.

  3. Log in to comment