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

Namespaces

namespace  Authored
namespace  Loaders
namespace  Materials
namespace  Textures

Classes

class  Animation
 Animation clip loaded from glTF animation data. More...
class  AnimationAssetManager
struct  AssetHandle
struct  AssetHandleHash
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
 Owns Vulkan resources for a sampled cubemap texture. More...
struct  CubemapTextureData
 CPU-side RGBA cubemap image data. More...
class  CubemapTextureLoader
 Loads cubemap face images from a directory. More...
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
 Asset manager for materials keyed by source file path and material name. More...
class  Mesh
 The mesh asset stores geometry data and. More...
class  MeshAssetManager
 Stores mesh data with their primitives. More...
class  RuntimeTexture
 Runtime-owned Vulkan texture resource. More...
class  Skin
 Skeleton definition loaded from glTF skin data. More...
class  SkinAssetManager
class  Texture
 Wrapper for texture data. More...
class  TextureAssetManager
 Asset manager for texture assets keyed by filesystem path. More...
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 AnimationAssetRef = Asset::Ref<Asset::MeshPath, Animation>
using SkinAssetRef = Asset::Ref<Asset::MeshPath, Skin>
using GltfHandle = AssetHandle<GltfHandleTag>
using GltfRenderableHandle = AssetHandle<GltfRenderableHandleTag>
using GeometryMeshHandle = AssetHandle<GeometryMeshHandleTag>
using MaterialHandle = AssetHandle<MaterialHandleTag>
using Texture2DHandle = AssetHandle<Texture2DHandleTag>
using CubemapTextureHandle = AssetHandle<CubemapTextureHandleTag>
using RenderTargetTextureHandle = AssetHandle<RenderTargetTextureHandleTag>
using FontAtlasTextureHandle = AssetHandle<FontAtlasTextureHandleTag>
using AudioClipHandle = AssetHandle<AudioClipHandleTag>
using SkeletalMeshHandle = AssetHandle<SkeletalMeshHandleTag>
using AnimationClipHandle = AssetHandle<AnimationClipHandleTag>
using SkinHandle = AssetHandle<SkinHandleTag>
using SkeletonHandle = AssetHandle<SkeletonHandleTag>
using FontHandle = AssetHandle<FontHandleTag>
using AudioAssetRef = Asset::Ref<Asset::Path, Audio>
using MaterialAssetRef = Asset::Ref<Asset::MeshPath, Material>
using MeshAssetRef = Asset::Ref<Asset::MeshPath, Mesh>
using TextureAssetRef = Asset::Ref<Asset::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

◆ AnimationAssetRef

◆ AnimationClipHandle

using Engine::Assets::AnimationClipHandle = AssetHandle<AnimationClipHandleTag>

Definition at line 63 of file AssetHandles.h.

◆ AudioAssetRef

◆ AudioClipHandle

using Engine::Assets::AudioClipHandle = AssetHandle<AudioClipHandleTag>

Definition at line 61 of file AssetHandles.h.

◆ CubemapTextureHandle

using Engine::Assets::CubemapTextureHandle = AssetHandle<CubemapTextureHandleTag>

Definition at line 58 of file AssetHandles.h.

◆ EmissiveTextureHandle

◆ FontAtlasTextureHandle

using Engine::Assets::FontAtlasTextureHandle = AssetHandle<FontAtlasTextureHandleTag>

Definition at line 60 of file AssetHandles.h.

◆ FontHandle

using Engine::Assets::FontHandle = AssetHandle<FontHandleTag>

Definition at line 66 of file AssetHandles.h.

◆ GeometryMeshHandle

using Engine::Assets::GeometryMeshHandle = AssetHandle<GeometryMeshHandleTag>

Definition at line 55 of file AssetHandles.h.

◆ GltfHandle

using Engine::Assets::GltfHandle = AssetHandle<GltfHandleTag>

Definition at line 53 of file AssetHandles.h.

◆ GltfRenderableHandle

using Engine::Assets::GltfRenderableHandle = AssetHandle<GltfRenderableHandleTag>

Definition at line 54 of file AssetHandles.h.

◆ LightmapTextureHandle

◆ MaterialAssetRef

◆ MaterialHandle

using Engine::Assets::MaterialHandle = AssetHandle<MaterialHandleTag>

Definition at line 56 of file AssetHandles.h.

◆ MeshAssetRef

◆ MetallicRoughnessTextureHandle

◆ NormalTextureHandle

◆ RenderTargetTextureHandle

using Engine::Assets::RenderTargetTextureHandle = AssetHandle<RenderTargetTextureHandleTag>

Definition at line 59 of file AssetHandles.h.

◆ SkeletalMeshHandle

using Engine::Assets::SkeletalMeshHandle = AssetHandle<SkeletalMeshHandleTag>

Definition at line 62 of file AssetHandles.h.

◆ SkeletonHandle

using Engine::Assets::SkeletonHandle = AssetHandle<SkeletonHandleTag>

Definition at line 65 of file AssetHandles.h.

◆ SkinAssetRef

◆ SkinHandle

using Engine::Assets::SkinHandle = AssetHandle<SkinHandleTag>

Definition at line 64 of file AssetHandles.h.

◆ Texture2DHandle

using Engine::Assets::Texture2DHandle = AssetHandle<Texture2DHandleTag>

Definition at line 57 of file AssetHandles.h.

◆ TextureAssetRef

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.