Dear Forum- I could use some help trying to get demo code working where colors add (for use with anaglyph glasses). I’m surely doing something old-fashioned and wrong, but any idea why the code snippet below does not show red and blue rectangles, with their intersection magenta (red+blue)? Thanks, Steve Engel
Description of the problem: I have an experiment where two images are drawn one on top of the other and the colors are added using blend mode = ‘add’. The experiment is working in PsychoPy (Builder) but when I display it on Pavlovia only one image is displayed. I think this is likely because of the blend mode. If I change the opacity to be 0.5 on both images I can then see the two images but I need them at full brightness. Does js/pavlovia not display blend mode = ‘add’ just ‘average’?
Yes, it works perfectly offline. I am using version v2021.2.3 here is the repo. Taking a closer look at the python vs the js code it seems like blendmode is ignored in the js code? Here are screenshots of the code that sets up the window
P.S. Steve and I are working on the problem together. We worked out that to blend our images properly with a black background we had to draw two white polygons behind the images. The first white polygon blends with the black background to make gray and the second polygon blends with the other two to make white. We can then draw the two images on top of these polygons and they blend properly. We now just need a way to display these on pavlovia.
Well, not quite, but almost. We got it to work in builder, but it is not clear still what is missing from the python code I posted to get it to work. But we can start subtracting line by line from the builder-created python code back to something simpler and see what it is.