I know I am the author of this code, but don't we have to test for a change in signed_texture[0] and signed_texture[P-1] as well, since it is circular?