I'd like to create a visual stimulus that is a mixture of two components, each of which is created using the Screen('FillRect', ...) command. The alpha-blending strategies suggested in BubbleDemo.m for example, seems like a reasonable approach, but I can't get it to work. In particular, I can't get the mixing weights to apply to an image drawn with Screen('FillRect', ...) rather than Screen('DrawTexture', ...). For example, exchanging the relevant Screen('DrawTexture', ...) commands in the SimpleImageMixingDemo.m (lines 127 and 131 in my version of PTB) with Screen('FillRect', ...) commands does not work.
I've also tried the strategies used in both BubbleDemo.m and ImageMixingTutorial.m, but neither seems to work. Is it possible to use alpha-blending to mix two rectangles drawn via Screen('FillRect', ...) rather than Screen('DrawTexture', ...)?
To be clear, I know that I can mix two rectangles by specifying their alpha-values directly in the Screen('FillRect', ...) command. This would work if the two objects are in the same spatial location on the screen and if the alpha value was constant across the entire rectangle. But I would like to use the alpha blending to specify a spatial arrangement of the components, i.e., one will only be at one location and the other will be at another location. Furthermore, the location of each component will change over time. So I'd really like to be able to specify the alpha-mask texture as an arbitrary matrix, whose elements select which rectangles are in which location on the screen.
I've also tried the strategies used in both BubbleDemo.m and ImageMixingTutorial.m, but neither seems to work. Is it possible to use alpha-blending to mix two rectangles drawn via Screen('FillRect', ...) rather than Screen('DrawTexture', ...)?
To be clear, I know that I can mix two rectangles by specifying their alpha-values directly in the Screen('FillRect', ...) command. This would work if the two objects are in the same spatial location on the screen and if the alpha value was constant across the entire rectangle. But I would like to use the alpha blending to specify a spatial arrangement of the components, i.e., one will only be at one location and the other will be at another location. Furthermore, the location of each component will change over time. So I'd really like to be able to specify the alpha-mask texture as an arbitrary matrix, whose elements select which rectangles are in which location on the screen.