Shared feature generation.