I try to put multiple Drifting Grating on the screen.
I open a window with gray background:
[w, display.windowRect] = PsychImaging('OpenWindow', screenNumber, 128);
then apply blend function:
Screen('BlendFunction', w, GL_ONE, GL_ONE);
I got an 2 dimension image matrix (here as "garting", scale between 0~255), and I use Make Texture to put it on screen:
Screen('MakeTexture', w, grating);
and then use DrawTexture to put it on the screen.
I have some difficulties, and still can't figure out:
When I only put one grating on the screen, I found that no matter what value is in my image matrix, the image is always brighter then my background...So I can only got "white" part of the grating and no "Dark part.
I open a window with gray background:
[w, display.windowRect] = PsychImaging('OpenWindow', screenNumber, 128);
then apply blend function:
Screen('BlendFunction', w, GL_ONE, GL_ONE);
I got an 2 dimension image matrix (here as "garting", scale between 0~255), and I use Make Texture to put it on screen:
Screen('MakeTexture', w, grating);
and then use DrawTexture to put it on the screen.
I have some difficulties, and still can't figure out:
When I only put one grating on the screen, I found that no matter what value is in my image matrix, the image is always brighter then my background...So I can only got "white" part of the grating and no "Dark part.