Dear community members,
I am now programming an experiment that required fast(<100ms) presentation of gratings (i.e., two superimposed gabors) at two different locations (A and B). I noticed that the luminescence always increase quite noticeably whenever two textures/gratings presented simultaneously. In other words, all other things being equal, the luminescence only remained consistent while single gratings being flipped. I was wondering whether this is a hardware, software driven issue or some problem with my script. As shown below:
My general strategy is to cover up previously flipped textures using FillRect, then draw new ones with my custom function Greatings in a huge for loop (not shown).
%% Covering up the previously flipped textures
FusionAid(windowPtr,destination_A,destination_B);
Screen('FillRect', windowPtr,[128 128 128], destinationRect_A);
Screen('FillRect', windowPtr,[128 128 128], destinationRect_B );
Screen('DrawDots', windowPtr, destination_dot_A, 5, [255 0 0], [0 0], 1, 1);
Screen('DrawDots', windowPtr, destination_dot_B, 5, [255 0 0], [0 0], 1, 1);
Screen('BlendFunction', windowPtr, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Screen('Flip', windowPtr);
WaitSecs(2);
%% Draw and flip the new gratings
FusionAid(windowPtr,destination_A,destination_B););
Gratings(windowPtr, gabor_size, destination_A)
Gratings(windowPtr, gabor_size, destination_B)
Screen('DrawDots', windowPtr, destination_dot_A, 5, [255 0 0], [0 0], 1, 1);
Screen('DrawDots', windowPtr, destination_dot_B, 5, [255 0 0], [0 0], 1, 1);
Screen('BlendFunction', windowPtr, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Screen('Flip', windowPtr);
WaitSecs(0.04);
% luminescence increase!!
Some troubleshooting attemps
-
Under the following condition the luminescence DO NOT increase (gratings only at either A or B location)
FusionAid(windowPtr,destination_A,destination_B););
Gratings(windowPtr, gabor_size, destination_B)
Screen(‘DrawDots’, windowPtr, destination_dot_A, 5, [255 0 0], [0 0], 1, 1);
Screen(‘DrawDots’, windowPtr, destination_dot_B, 5, [255 0 0], [0 0], 1, 1);
Screen(‘BlendFunction’, windowPtr, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Screen(‘Flip’, windowPtr);
WaitSecs(0.04);
% NO luminescence increase!! -
NO luminescence increase in the following condition either. (B location FillRect + A location gratings)
FusionAid(windowPtr,destination_A,destination_B);); Gratings(windowPtr, gabor_size, destination_A) Screen('FillRect', windowPtr,[128 128 128], destinationRect_B ); Screen('DrawDots', windowPtr, destination_dot_A, 5, [255 0 0], [0 0], 1, 1); Screen('DrawDots', windowPtr, destination_dot_B, 5, [255 0 0], [0 0], 1, 1); Screen('BlendFunction', windowPtr, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); Screen('Flip', windowPtr); WaitSecs(0.04); % NO luminescence increase!!
-
I also use VRR function for more accurate timing with:
PsychImaging(‘AddTask’, ‘General’, ‘UseFineGrainedTiming’);
However, the issue persisted even after disabling the function altogether.
Any comment or suggestions would be appreciated.
Thanks in advance.
Additional info:
The size of the gratings and FillRect are just 200x200 pixels. I imagine RX580 should be powerful enough to drive the given task?
Hardware
intel i7 10700
AMD RX580
MSI MAG motherboard 8460M
MSI 240Hz FreeSync compatible Monitor
Software environment
Ubuntu 20.04 LTS
Matlab 2019b
GPU Driver : xf86-videoamdgpu-pro DOX video driver (latest gpu driver i can find)
Psychtoolbox3 Version 3.0.16