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\$
1
  • \$\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\$ Mar 13, 2017 at 17:58

1 Answer 1

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .