vkmEngine 1.0.15
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
asset_source_kind.h
1#pragma once
2
3#include <string>
4
5#include <nlohmann/json_fwd.hpp>
6
7#include "resource/texture_format.h"
8
9namespace Vkm::Engine {
10
18namespace AssetSourceKind {
20 inline constexpr const char* COOKED = "cooked";
22 inline constexpr const char* DECIMATE = "decimate";
23 inline constexpr const char* FILE = "file";
24 inline constexpr const char* GENERATOR = "generator";
25 inline constexpr const char* MODEL = "model";
27 inline constexpr const char* MODEL_IMAGE = "model-image";
28 inline constexpr const char* SOLID = "solid";
29
30} // namespace AssetSourceKind
31
37namespace AssetSourceKey {
39 inline constexpr const char* KIND = "kind";
41 inline constexpr const char* USAGE = "usage";
43 inline constexpr const char* PATH = "path";
44 inline constexpr const char* MESH = "mesh";
46 inline constexpr const char* CLIP = "clip";
48 inline constexpr const char* RIG = "rig";
50 inline constexpr const char* MARKERS = "markers";
51 inline constexpr const char* REF = "ref";
53 inline constexpr const char* BASE = "base";
55 inline constexpr const char* RATIO = "ratio";
57 inline constexpr const char* GENERATE_MIPMAPS = "generateMipmaps";
59 inline constexpr const char* WRAP = "wrap";
61 inline constexpr const char* FILTER = "filter";
64 inline constexpr const char* ROUGHNESS_NORMAL = "roughnessNormal";
65} // namespace AssetSourceKey
66
76TextureUsage textureUsageFromRecipe(const nlohmann::json& source);
77
88void reportUnknownTextureValue(
89 const nlohmann::json& source,
90 const char* key,
91 const std::string& known,
92 const char* readAs
93);
94
95} // namespace Vkm::Engine
Keys a source descriptor is written with in one file and read by in another.
Definition asset_source_kind.h:37
constexpr const char * GENERATE_MIPMAPS
Whether a texture builds a mip chain.
Definition asset_source_kind.h:57
constexpr const char * MESH
Definition asset_source_kind.h:44
constexpr const char * CLIP
Which of a model file's animations.
Definition asset_source_kind.h:46
constexpr const char * FILTER
A texture's filter override, when it has one (textureFilterFromRecipe).
Definition asset_source_kind.h:61
constexpr const char * PATH
The source file an import reads, project-relative.
Definition asset_source_kind.h:43
constexpr const char * ROUGHNESS_NORMAL
Definition asset_source_kind.h:64
constexpr const char * WRAP
A texture's wrap mode, when it does not clamp (textureWrapFromRecipe).
Definition asset_source_kind.h:59
constexpr const char * BASE
The mesh a decimated level is derived from, by name.
Definition asset_source_kind.h:53
constexpr const char * REF
Definition asset_source_kind.h:51
constexpr const char * KIND
Which import rebuilds the asset, an AssetSourceKind string.
Definition asset_source_kind.h:39
constexpr const char * RIG
The rig of another file a clip is bound to, by name.
Definition asset_source_kind.h:48
constexpr const char * RATIO
A decimated level's share of its base's triangles.
Definition asset_source_kind.h:55
constexpr const char * MARKERS
A clip's authored {name, time} markers.
Definition asset_source_kind.h:50
constexpr const char * USAGE
What a texture's texels mean, a TextureUsage name.
Definition asset_source_kind.h:41
The kind field of an asset's source descriptor.
Definition asset_source_kind.h:18
constexpr const char * MODEL
Definition asset_source_kind.h:25
constexpr const char * FILE
One file on disk, decoded as-is.
Definition asset_source_kind.h:23
constexpr const char * GENERATOR
A primitive built by the mesh generators.
Definition asset_source_kind.h:24
constexpr const char * DECIMATE
A mesh derived from another by simplification (an LOD).
Definition asset_source_kind.h:22
constexpr const char * COOKED
What an asset read from its cooked file carries instead of its recipe.
Definition asset_source_kind.h:20
constexpr const char * MODEL_IMAGE
A texture embedded in, or referenced beside, a model file.
Definition asset_source_kind.h:27
constexpr const char * SOLID
A single-colour texture.
Definition asset_source_kind.h:28