wrap setting layers in a modulus call to keep within range like uint (can now use -1 for all layers)