Hi,
I'm using the alpha blending function in psychtoolbox to superimpose two gratings.
The gratings I'm using were created by "CreateProceduralSineGrating", backgroundColorOffset was set to [0.5,0.5,0.5,0], the blending function was Screen('BlendFunction', win, GL_SRC_ALPHA, GL_ONE). I choose this blending function because it's what they used in the "AdditiveBlendingForLinearSuperpositionTutorial" demo.
However, I'm confused about two things:
First, I cannot use a contrast higher than 0.5 for the component gratings. If the contrast exceeds 0.5, the color seems to get reversed and the superimposed gratings look weird.
Secondly, I think the visible contrast of the superimposed gratings is lower than that of its component gratings. So my question is, is there a way to find out what the exact contrast of the new stimulus is?
p.s. I also tried the Screen('BlendFunction', win, GL_ONE, GL_ONE) function as was mentioned in some earlier posts, however, the superimposed grating created was not what I expected.
Qing
I'm using the alpha blending function in psychtoolbox to superimpose two gratings.
The gratings I'm using were created by "CreateProceduralSineGrating", backgroundColorOffset was set to [0.5,0.5,0.5,0], the blending function was Screen('BlendFunction', win, GL_SRC_ALPHA, GL_ONE). I choose this blending function because it's what they used in the "AdditiveBlendingForLinearSuperpositionTutorial" demo.
However, I'm confused about two things:
First, I cannot use a contrast higher than 0.5 for the component gratings. If the contrast exceeds 0.5, the color seems to get reversed and the superimposed gratings look weird.
Secondly, I think the visible contrast of the superimposed gratings is lower than that of its component gratings. So my question is, is there a way to find out what the exact contrast of the new stimulus is?
p.s. I also tried the Screen('BlendFunction', win, GL_ONE, GL_ONE) function as was mentioned in some earlier posts, however, the superimposed grating created was not what I expected.
Qing