In practice this limits materials to 10 samplers since Filament uses 5 for lights and skips 1 slot for the post-process sampler. This can probably be optimized.