A method to optimize angular selective filtering of direct solar radiation by minimization of the directional light transmission of a window at preset date and time of day, taking into account the geographical coordinates of building, the trajectory of the sun, the seasonal and daily distribution of radiation intensity, and the azimuth of the window is proposed. The minimum light transmittance is ensured by application of an optical filter with two sloped surface gratings at the expense of optimum slope angle of filter’s gratings on the window pane(s), widths of transmissive and non-transmissive strips of both gratings, and their mutual arrangement. Results of determination of the optimum slope angles of filter’s gratings at the different dates, azimuths of the window, latitudes, refractive indices and distances between filter’s gratings are demonstrated.