How do you generate Mips at runtime?

DeAccepted this as it doesn’t work on iOS - I get mostly black textures. Might be a simple logic problem I’m not sure yet.