Resonant grating waveguide structures