This pattern uses fewer instructions and also avoids using max, which does not work on infinity. Also remove unreferenced techniques from scale filters.