2#include "Engine/Core/Asset.h"
3#include "Engine/Core/Settings.h"
4#include "Engine/Files/AssetPath.h"
5#include "Engine/Asset/AssetHandles.h"
6#include "Engine/Mesh/GltfLoader.h"
14 class ModelAssetPipeline;
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
entt::entity data
Entity containing the asset's component data.
entt::registry & mainRegistry
Registry that owns this asset's ECS data.
A manager which is used to look up existing assets and their loading state.
MaterialAssetManager()=default
Creates an empty material asset manager.
std::filesystem::path metallicRoughnessTexturePath
Path to metallic-roughness texture from glTF.
std::filesystem::path emissiveTexturePath
Path to emissive texture from glTF.
void setLightmapTextureHandle(Texture2DHandle h)
Set the lightmap texture handle (type-safe)
const std::filesystem::path & getBaseColorTexturePath() const
Gets the base color texture path for this material.
T & getData()
Method to get the material data from the ecs with the corresponding type.
Material(const Asset::MeshPath &assetPath, bool initWithDefaultData=false)
Creates a material asset for a source mesh path.
void setBaseColorTextureHandle(Texture2DHandle h)
Set the base color texture handle (type-safe)
Texture2DHandle getBaseColorTextureHandle() const
Get the type-safe base color texture handle.
Texture2DHandle emissiveTextureHandle_
Descriptor handle for the emissive texture slot.
Texture2DHandle metallicRoughnessTextureHandle_
Descriptor handle for the metallic-roughness texture slot.
Texture2DHandle getMetallicRoughnessTextureHandle() const
Get the type-safe metallic-roughness texture handle.
Texture2DHandle getNormalTextureHandle() const
Get the type-safe normal texture handle.
Texture2DHandle normalTextureHandle_
Descriptor handle for the normal texture slot.
Rendering::PipelineNames type
Pipeline used to render this material.
void setEmissiveTexturePath(const std::filesystem::path &path)
Sets the emissive texture path for this material.
void setNormalTexturePath(const std::filesystem::path &path)
Sets the normal map texture path for this material.
const std::filesystem::path & getLightmapTexturePath() const
Gets the lightmap texture path for this material.
const std::filesystem::path & getEmissiveTexturePath() const
Gets the emissive texture path for this material.
Texture2DHandle getEmissiveTextureHandle() const
Get the type-safe emissive texture handle.
void setMetallicRoughnessTextureHandle(Texture2DHandle h)
Set the metallic-roughness texture handle (type-safe)
void setLightmapTexturePath(const std::filesystem::path &path)
Sets the lightmap texture path for this material.
void setNormalTextureHandle(Texture2DHandle h)
Set the normal texture handle (type-safe)
Texture2DHandle lightmapTextureHandle_
Descriptor handle for the lightmap texture slot.
std::filesystem::path baseColorTexturePath
Path to base color texture from glTF.
Rendering::PipelineNames getType() const
Gets the material type for pipeline lookup.
Texture2DHandle baseColorTextureHandle_
Descriptor handle for the base color texture slot.
const std::filesystem::path & getMetallicRoughnessTexturePath() const
Gets the metallic-roughness texture path for this material.
std::filesystem::path lightmapTexturePath
Path to lightmap texture from VulkanSchnee extension.
void setMetallicRoughnessTexturePath(const std::filesystem::path &path)
Sets the metallic-roughness texture path for this material.
void updateLoadingState() override
Updates the loading state based on presence of material ECS components.
std::filesystem::path normalTexturePath
Path to normal map texture from glTF.
Texture2DHandle getLightmapTextureHandle() const
Get the type-safe lightmap texture handle.
void setBaseColorTexturePath(const std::filesystem::path &path)
Sets the base color texture path for this material.
void unload() override
Unload data.
void setEmissiveTextureHandle(Texture2DHandle h)
Set the emissive texture handle (type-safe)
const std::filesystem::path & getNormalTexturePath() const
Gets the normal map texture path for this material.
The model asset pipeline loads a gltf scene and loads and loads the mesh and material data....
AssetHandle< Texture2DHandleTag > Texture2DHandle
Handle to a file-backed sampled 2D texture.
EnTT component data used by engine systems.
PipelineNames
Named graphics pipelines used by material selection and shader lookup.
Identifies a named mesh-like asset inside an asset file.