It has been assumed that stimulus discrimination in a visual task is p
erformed with fixed attentive effort. Here we show that attention to t
he same pair of stimuli can be modulated by varying the task difficult
y when a task requires the discrimination of only a small number of di
fferent stimuli. We used a matching-to-sample paradigm, where a test s
timulus is presented after a sample stimulus. When both stimuli Gabor
gratings have identical orientations (''matching'' trial) the required
response is different from when they have different orientations (''n
on-matching'' trial). The task difficulty was manipulated by changing
the orientation difference between sample and test stimuli for non-mat
ching trials. Difficult non-matching probe trials were embedded within
an easy block of trials (easy environment), and vice versa for easy p
robe trials. Detectability (d') differences for the same pairs of stim
uli (probe trials) in the two environments were calculated as a measur
e for change in attentional effort, regardless of changes in likelihoo
d ratios (beta). Our results show an increase in d' during the difficu
lt task, for both types of probe trials, in paradigms that contained a
small number of stimulus combinations. Thus a modulation in attention
al effort along a single discrimination dimension is revealed. However
it is restricted by the number of stimulus combinations, due to the l
imited capacity of the attention available for each stimulus combinati
on.