Light modulation with resonant grating–waveguide structures | Synapse