What if, the resolution of an object would decrease, the further you went from it, and then less details you needed. Of course I could use Vector3.Distance or .magintude() but that would murder every GPU and CPU there is. Is there maybe a built-in way? Using methods mentioned before would be murder for hardware when programmed in C#, but maybe Unity has some good bindings in C++? I would like to define images of sizes n*n, where n would be: 1 (few kilometers away), 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 (right in-front of it).
Minor correction: Mipmaps are editor generated. The engine just passes the textures with the generated mipmaps to the GPU which handles the actual choosing of the mipmap level. This isn’t done by distance exactly, but instead by calculating the texel screen size, or how many screen pixels a texture pixel covers, which takes into account the distance, surface facing, and field of view.
The expensive part of distance calculations is the square root, so you just don’t do it and keep a table of the distances you want the different detail levels as distance squared. This is pretty standard LOD stuff for large scale environments. Open world games will often combine huge portions of the game into single low polygon meshes with a single low resolution texture across the entire surface. Then as you get closer load multiple slightly higher poly mesh chunks, etc. until you finally are close enough to show the full detail models.