btu/tex/formats.hpp file

Namespaces

namespace btu
namespace btu::tex

Classes

struct btu::tex::BestFormatFor
struct btu::tex::GuessBestFormatArgs

Enums

enum class TextureType: std::uint8_t { Diffuse, Normal, Cube, Specular, Glow, Parallax, ModelSpaceNormal, Backlight, Skin, EnvironmentMask }

Functions

NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(BestFormatFor, uncompressed, uncompressed_without_alpha, compressed, compressed_without_alpha)
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(GuessBestFormatArgs, opaque_alpha, allow_compressed, force_alpha)
NLOHMANN_JSON_SERIALIZE_ENUM(TextureType, {{TextureType::Diffuse, "diffuse"}, {TextureType::Normal, "normal"}, {TextureType::Cube, "cube"}, {TextureType::Specular, "specular"}, {TextureType::Glow, "glow"}, {TextureType::Parallax, "parallax"}, {TextureType::ModelSpaceNormal, "model_space_normal"}, {TextureType::Backlight, "backlight"}, {TextureType::Skin, "skin"}, {TextureType::EnvironmentMask, "environment_mask"}})
auto guess_best_format(DXGI_FORMAT current_format, BestFormatFor formats, const GuessBestFormatArgs& guess_params) →  DXGI_FORMAT noexcept
auto guess_texture_type(std::u8string_view path) →  std::optional<TextureType> noexcept
Based on https://forums.nexusmods.com/index.php?/topic/476227-skyrim-nif-files-with-underscores/.