The design and realization of high-quality bandpass optical filters are often very difficult tasks due to the strong correlation of the optical index of dielectric thin films to their final thickness, as observed in many industrial deposition processes. We report on the optimization of complex optical filters in the visible and NIR spectral ranges as realized by ion beam-assisted electron beam deposition of silica and titanium oxide multilayers. We show that this process always leads to amorphous films prior to thermal annealing. On the contrary, the optical dispersion of TiO2 nanolayers is highly dependent on their thickness, while this dependence vanishes for layers thicker than 100 nm. We demonstrate that accounting for this nonlinear dependence of the optical index is both very important and necessary in order to obtain high-quality optical filters.