0
\$\begingroup\$

I'm trying to load a big terrain texture and only want to load a certain mipmap level to the GPU with Vulkan. When the whole terrain is in sight, the camera is far enough away from it so that only a mipmap of the whole terrain texture would be enough for renderering. So for that I don't want to load the whole texture on the GPU just for mipmap generation. So is it possible to generate the mipmap on CPU first? If so, what techniques are being used for mipmapping or (maybe better) is there already a implementation (library) for generating a mipmap on CPU?

\$\endgroup\$
  • \$\begingroup\$ It's possible that this approach is going to work out slower than just loading the full texture to the GPU. Mipmapping on the CPU will always be slower anyway, and you'll need to constantly refresh the texture as the player moves around. \$\endgroup\$ – Maximus Minimus Mar 13 '17 at 17:58
0
\$\begingroup\$

Its most likely better to pregenerate and store the lower precision mipmaps along side the original texture in your assets. Then only when you need the higher resolution image do you actually load it from disk.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.