Example 36 - HDR / float texture loading.
← All examples36_hdr
Loads an equirectangular .hdr environment three ways and draws each as a quad: - MK_TEXTURE_HDR -> float decode, RGBA16F (the default HDR format) - mk_texture_load_ex -> float decode, RGBA32F (the power-path option) - MK_TEXTURE_NONE -> NO flag; the .hdr is auto-detected and STILL decoded as float (never silently tonemapped to 8-bit). This is the footgun fix. This is a loader smoke test: it confirms each load yields a valid handle with the correct dimensions and samples correctly. The canvas present is LDR, so the bright (>1.0) regions clip to white here - exposure/tonemapping of the float data is a renderer/IBL-package concern, shown in the LearnOpenGL IBL lessons that consume this loader.

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.
- Number
- 36
- Tags
- Source
examples/36_hdr/main.c
Build and run
./scripts/build-linux.sh release --target=36_hdr --run