Hello,
I am using the CreateProceduralSineGrating to create color modulated gratings. My goal is to create a grating which peaks at green cyan (RBG [0 0.8 0.5]) and troughs at middle cyan [0 0.5 0.5]. However, I have been unable to create what I want so far. The code I have used to create my gratings is below.
% To create the grating
backgroundColorOffsetCy = [0 0.5 0.5 1]; %RGBA offset color
[gratingidG, gratingrectG] = CreateProceduralSineGrating(windowPtr, screenXpixels, screenXpixels, backgroundColorOffsetCy, [], 1);
% To display the grating
modulateCol = [0 0.8 0.5];
propertiesMat = [0, 0.005, 1, 0];
Screen('DrawTexture', windowPtr, gratingidG, [], dstRect , Angle, [] , [], [modulateCol], [], [], propertiesMat' );
This code creates a grating similar to what can be seen in the attachment. It looks to peak at the right color however it fades into black instead of middle cyan. Any help in changing the creation commands to achieve what I want would be greatly appreciated.
Thanks,
Michael