Skip to content
modkitv0.2

Example 35 - mipmap policy: none vs CPU vs GPU generation.

← All examples35_gpu_mips

Loads the same image three ways and draws each heavily minified (a big source shrunk into a small quad), where mipmaps matter most: - NO MIPS -> shimmery/aliased minification - CPU MIPS -> smooth (stb_image_resize at load) - GPU MIPS -> smooth, generated on the GPU (MK_TEXTURE_MIPS_GPU); should look identical to CPU, with no sRGB darkening. GPU mips are produced one frame after load (deferred), so by the time anything is visible they're ready.

Example 35 - mipmap policy: none vs CPU vs GPU generation.

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.

Number
35
Tags
2dvectortextureinput
Source
examples/35_gpu_mips/main.c

Build and run

./scripts/build-linux.sh release --target=35_gpu_mips --run