The fringing field effect of liquid-crystal displays causes a crosstalk between neighboring pixels, so that a desired sharp phase edge gets blurred. This blurring effect influences the diffraction efficiency of holograms, which are displayed on the spatial light modulator (SLM). In this paper, we show two different simulation models for the SLM, one based on the measured subpixel Jones matrices of the SLM and the other based on a direction-dependent convolution model. Using these models we optimize different blazed gratings written in the SLM according to their diffraction efficiency followed by an experimental verification.