Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Material Struct Reference

Represents a material component defining rendering properties. More...

#include <Material.hpp>

Public Member Functions

 Material (const glm::vec4 &c={ 1.f, 1.f, 1.f, 1.f }, VkDescriptorSet ds=VK_NULL_HANDLE, VkPipeline pp=VK_NULL_HANDLE)
 Construct a new Material object.

Public Attributes

uint32_t id
 Unique identifier for this material.
glm::vec4 color { 1.0f }
std::string texturePath
VkDescriptorSet descriptorSet { VK_NULL_HANDLE }
 Vulkan descriptor set representing resource bindings.
VkPipeline pipeline { VK_NULL_HANDLE }
 Optional per-material custom Vulkan pipeline.
VkPipelineLayout pipelineLayout { VK_NULL_HANDLE }
 Optional per-material custom Vulkan pipeline layout.
TextureFilterMode filterMode = TextureFilterMode::Bilinear
 Texture filter mode.
std::string shaderName = "Unlit"
std::string normalMapPath
std::string metallicMapPath
float roughness = 0.5f
float metallic = 0.0f

Detailed Description

Represents a material component defining rendering properties.

Constructor & Destructor Documentation

◆ Material()

Material::Material ( const glm::vec4 & c = { 1.f,1.f,1.f,1.f },
VkDescriptorSet ds = VK_NULL_HANDLE,
VkPipeline pp = VK_NULL_HANDLE )
inline

Construct a new Material object.

Parameters
cColor of the material.
dsDescriptor set associated with this material.
ppCustom graphics pipeline.

Member Data Documentation

◆ color

glm::vec4 Material::color { 1.0f }

◆ descriptorSet

VkDescriptorSet Material::descriptorSet { VK_NULL_HANDLE }

Vulkan descriptor set representing resource bindings.

◆ filterMode

Texture filter mode.

◆ id

uint32_t Material::id

Unique identifier for this material.

◆ metallic

float Material::metallic = 0.0f

◆ metallicMapPath

std::string Material::metallicMapPath

◆ normalMapPath

std::string Material::normalMapPath

◆ pipeline

VkPipeline Material::pipeline { VK_NULL_HANDLE }

Optional per-material custom Vulkan pipeline.

◆ pipelineLayout

VkPipelineLayout Material::pipelineLayout { VK_NULL_HANDLE }

Optional per-material custom Vulkan pipeline layout.

◆ roughness

float Material::roughness = 0.5f

◆ shaderName

std::string Material::shaderName = "Unlit"

◆ texturePath

std::string Material::texturePath

The documentation for this struct was generated from the following file: