|
Foundation
|
#include "Texture.hpp"#include <bc7enc.h>#include <limits>#include <stb_image_write.h>#include <stb_image.h>Functions | |
| void | LoadDDS (FTexture &texture, StringView path) |
| void | LoadRGBA8 (FTexture &texture, StringView path, bool gamma) |
| void | LoadRGBA8 (FTexture &texture, Span< const unsigned char > data, bool gamma) |
| void | LoadHDR (FTexture &texture, StringView path) |
| void | SaveHDR (const float *data, int width, int height, StringView path) |
| void | SavePNG (const unsigned char *data, int width, int height, StringView path) |
| void LoadDDS | ( | FTexture & | texture, |
| StringView | path | ||
| ) |
Loads a DDS file into a texture
| void LoadHDR | ( | FTexture & | texture, |
| StringView | path | ||
| ) |
Loads HDR image formats (.hdr) via stb_image into an R32G32B32A32Float texture. Used for environment maps.
Loads standard image formats (PNG, JPG, etc.) via stb_image into an uncompressed R8G8B8A8 texture from memory
| gamma | Whether to load the image as sRGB (true) or linear (false) encoding. |
| void LoadRGBA8 | ( | FTexture & | texture, |
| StringView | path, | ||
| bool | gamma = true |
||
| ) |
Loads standard image formats (PNG, JPG, etc.) via stb_image into an uncompressed R8G8B8A8 texture
| gamma | Whether to load the image as sRGB (true) or linear (false) encoding. |
Saves float RGBA pixel data as an HDR image. Output format is Radiance HDR (stb_image_write), RGB only (alpha discarded).
| data | Pointer to float RGBA pixel data (4 floats per pixel). |
| width | Image width in pixels. |
| height | Image height in pixels. |
| path | Output file path. |