This is exactly what I did and now I do not have the transparency effect.
-> Good. I fixed some of the scripts with round() statements for the next ptb beta.
However, I noticed another problem. One of my stimulus is a very low contrast (1%) gray sine grating. However, with this contrast I see only two shades of gray: background and grating. I do not see any gradual transitions between the grating strips. Unlike my Ubuntu Linux, I do see these transitions on my mac. The values in the grating matrix have 4 digits after the point, which is apparently enough for good precision:
128.6874 128.5462 128.3964 128.2404 128.0805 127.9195 ...
-> The digits get truncated to zero by PTB, to integral values 0 - 255, so above sequence would get drawn as 128,128,128,128,128,127
-> Exactly two values. The framebuffer is 8 bpc by default, so also can only represent those 256 discrete levels
So i'm not sure how you could get anything but 2 levels? That BenQ display you have also only supports 256 discrete levels.
You'd have to show me your exact code that you use. Also the specification of the Mac - what Macintosh model, graphics card, monitor, what OSX version? Same Psychtoolbox? Same display device and display settings (resolution etc.)? Moving stimuli?
You can use Screen('GetImage', ...) to take screenshots of what ends up in the framebuffer.
When I change gamma in the terminal window: xgamma -gamma 2.2, it does not help.
How can I increase the precision?
-> You could use high precision floating point textures and high precision floating point framebuffers, as well as a Native 10 bit framebuffer mode. Cfe. AdditiveBlendingForLinearSuperpositionTutorial ('Native10Bit') that demonstrates this and the needed setup steps. Your BenQ 240 Hz panel is only 8 bpc capable, so it can't really output finer than 1/256th. However, you can enable digital display spatial dithering, and that would perceptually simulate 10 bpc or 1024 levels of intensity. Downside might be that the dithering method would interfere with high frequency spatial low level stimuli like gratings of small period. Another perceptual method of simulating ~ 10.7 bpc on a 8 bpc display is to use the method shown via AdditiveBlendingForLinearSuperpositionTutorial ('PseudoGray') for pure luminance/grayscale stimuli. That one requires proper gamma correction and may not introduce spatial artifacts, but slight colorization.
I'm a bit worried if you want to use such low contrast gratings on the 240 Hz display for animations? LCD panels are not known for fast pixel response times. The way such fast panels like yours achieve the feat of 240 fps animations is usually by using all kinds of trickery like Overdrive to boost the transition speed of the lcd pixels. Those usually come with significant color/luminance artifacts or loss of precision for fast moving stimuli, which may well totally distort your stimulus especially at such low contrasts, effectively showing not the stimuli you actually specified. The rule for digital displays is usually "fast, accurate, cheap -- pick (at most) two of these".
-mario
Elena