Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets Namespace Reference

Namespaces

namespace  Loaders
namespace  Materials
namespace  Textures

Classes

class  Animation
 Animation clip loaded from glTF animation data. More...
class  Audio
 Holds decoded PCM audio data as an engine asset. More...
class  AudioAssetManager
 Manages audio assets by filesystem path, providing dedup and lookup. More...
struct  AudioData
 Decoded audio data ready for playback. More...
class  CubemapTexture
struct  CubemapTextureData
class  CubemapTextureLoader
class  ExrTextureAsset
 Extension of TextureAsset and stores the Exr header information as well as the texture data. More...
class  GltfTextureAsset
 Extension of TextureAsset for images loaded from glTF files (PNG/JPG) More...
struct  Joint
 A single joint in a skeleton hierarchy. More...
class  Material
 the material asset is another wrapper for asset data which is stored in entt. It has the EngineCore::MaterialAsset::type member variable which corresponds to the component used to store the material data More...
class  MaterialAssetManager
class  Mesh
 The mesh asset stores geometry data and. More...
class  MeshAssetManager
 Stores mesh data with their primitives. More...
class  RuntimeTexture
class  Skin
 Skeleton definition loaded from glTF skin data. More...
class  Texture
 Wrapper for texture data. More...
class  TextureAssetManager
class  TextureHandle
 Type-erased texture handle for runtime storage. More...
class  TypedTextureHandle
 Type-safe texture handle wrapper providing compile-time type safety. More...

Typedefs

using AudioAssetRef = Asset::Ref<std::filesystem::path, Audio>
using MaterialAssetRef = Asset::Ref<Asset::Path, Material>
using MeshAssetRef = Asset::Ref<Asset::Path, Mesh>
using TextureAssetRef = Asset::Ref<std::filesystem::path, Texture>
using AlbedoTextureHandle = TypedTextureHandle<TextureType::BaseColor>
using NormalTextureHandle = TypedTextureHandle<TextureType::Normal>
using MetallicRoughnessTextureHandle = TypedTextureHandle<TextureType::MetallicRoughness>
using EmissiveTextureHandle = TypedTextureHandle<TextureType::Emissive>
using LightmapTextureHandle = TypedTextureHandle<TextureType::Lightmap>

Enumerations

enum class  TextureType : uint8_t {
  BaseColor ,
  Normal ,
  MetallicRoughness ,
  Emissive ,
  Lightmap ,
  Unknown
}
 Represents the semantic type of a texture, determining its Vulkan format. More...

Functions

constexpr VkFormat getVkFormat (TextureType type, int bits, int components)
 Get the correct VkFormat based on texture type and image properties.
constexpr bool requiresLinearFormat (TextureType type)
 Check if a texture type requires linear (non-SRGB) format.

Typedef Documentation

◆ AlbedoTextureHandle

◆ AudioAssetRef

using Engine::Assets::AudioAssetRef = Asset::Ref<std::filesystem::path, Audio>

Definition at line 11 of file AudioAssetRef.h.

◆ EmissiveTextureHandle

◆ LightmapTextureHandle

◆ MaterialAssetRef

◆ MeshAssetRef

◆ MetallicRoughnessTextureHandle

◆ NormalTextureHandle

◆ TextureAssetRef

using Engine::Assets::TextureAssetRef = Asset::Ref<std::filesystem::path, Texture>

Definition at line 11 of file TextureAssetRef.h.

Enumeration Type Documentation

◆ TextureType

enum class Engine::Assets::TextureType : uint8_t
strong

Represents the semantic type of a texture, determining its Vulkan format.

Different texture types require different VkFormats for correct rendering:

  • Color textures (BaseColor, Emissive) need SRGB formats for gamma-correct rendering
  • Linear data textures (Normal, MetallicRoughness) need UNORM formats
  • HDR textures (Lightmap) need floating-point formats
Enumerator
BaseColor 

Color data with gamma (SRGB format for 8-bit)

Normal 

Linear data for normal maps (UNORM format for 8-bit)

MetallicRoughness 

Linear data for PBR parameters (UNORM format for 8-bit)

Emissive 

Color data with gamma (SRGB format for 8-bit)

Lightmap 

HDR baked lighting data (SFLOAT format)

Unknown 

Fallback type, uses SRGB as default.

Definition at line 15 of file TextureType.h.

Function Documentation

◆ getVkFormat()

VkFormat Engine::Assets::getVkFormat ( TextureType type,
int bits,
int components )
constexpr

Get the correct VkFormat based on texture type and image properties.

This function centralizes format selection logic, ensuring that:

  • Normal maps use LINEAR formats (VK_FORMAT_R8G8B8A8_UNORM)
  • Color textures use SRGB formats (VK_FORMAT_R8G8B8A8_SRGB)
  • HDR textures use floating-point formats
Parameters
typeThe semantic type of the texture
bitsBits per component (8, 16, or 32)
componentsNumber of color components (1-4)
Returns
The appropriate VkFormat for the texture

Definition at line 37 of file TextureType.h.

References BaseColor, Emissive, Lightmap, MetallicRoughness, Normal, and Unknown.

◆ requiresLinearFormat()

bool Engine::Assets::requiresLinearFormat ( TextureType type)
constexpr

Check if a texture type requires linear (non-SRGB) format.

Parameters
typeThe texture type to check
Returns
true if the texture should use LINEAR/UNORM format, false for SRGB

Definition at line 129 of file TextureType.h.

References BaseColor, Emissive, Lightmap, MetallicRoughness, Normal, and Unknown.