The effect of inhomogeneity of the anchoring energy between the direct
or and the surface of a nematic cell on the threshold of the Frederick
sz transition in the light field with the spatially modulated intensit
y has been studied as well as its effect on the director distribution
in the cell volume in its non-threshold interaction with the light. Th
e periodic dependence of the anchoring energy on the coordinates of th
e point on the cell surface is considered. The analytical expressions
for the threshold Of the Fredericksz transition are obtained at small
amplitudes of the anchoring energy, whereas at large amplitudes, the t
hreshold value is determined only numerically. The director distributi
on in the cell volume in the nonthreshold interaction with the light i
s a super-position of cosine-like gratings with various periods. The e
xpressions of the diffraction efficiency of the most intense phase gra
tings of the director are obtained as functions of the amplitude and t
he period of the anchoring energy of the director.