|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
#include <MaterialShader.h>
Public Member Functions | |
| MaterialShader ()=default | |
| MaterialShader (const std::filesystem::path &meshShaderPath, const std::filesystem::path &fragmentShaderPath) | |
| void | setPipeline (GraphicsPipeline *pipeline) |
| Sets the pipeline which corresponds to. | |
| std::filesystem::path | getMeshShaderPath () const |
| Getter for the mesh shader path. | |
| std::filesystem::path | getFragShaderPath () const |
| Getter for the fragment shader path. | |
| GraphicsPipeline * | getPipeline () const |
| PipelineMaterialPayload | getPipelineData () const |
| std::string | toString () const |
Static Public Member Functions | |
| static std::string | getPipelineNameFromString (PipelineNames pipelineName) |
| Gets the pipeline name as string. | |
| static PipelineNames | getPipelineNameFromString (const std::string &pipelineName) |
| Converts the string name of a pipeline into the actual pipeline enum. | |
Static Private Member Functions | |
| static const BidirectionalMap< std::string, PipelineNames > & | getMaterialNameMap () |
Private Attributes | |
| DynamicMaterialUniformData | dynamicUniformData = {} |
| std::filesystem::path | meshShaderPath = "" |
| std::filesystem::path | fragmentShaderPath = "" |
| PipelineMaterialPayload | pipelineData = {} |
| GraphicsPipeline * | pipeline = nullptr |
| std::string | defaultMeshShader = "assets/Engine/shaders/Output/triangle.mesh.spv" |
| std::string | defaultFragShader = "assets/Engine/shaders/Output/triangle.frag.spv" |
Definition at line 17 of file MaterialShader.h.
|
default |
References fragmentShaderPath, meshShaderPath, and pipeline.
| EngineCore::MaterialShader::MaterialShader | ( | const std::filesystem::path & | meshShaderPath, |
| const std::filesystem::path & | fragmentShaderPath ) |
Definition at line 8 of file MaterialShader.cpp.
References fragmentShaderPath, and meshShaderPath.
|
nodiscard |
Getter for the fragment shader path.
Definition at line 24 of file MaterialShader.cpp.
References fragmentShaderPath.
|
staticprivate |
Definition at line 71 of file MaterialShader.cpp.
References EngineCore::DIFFUSE_FLAT_COLOR, EngineCore::DIFFUSE_SHADER, EngineCore::DYNAMIC_TEXTURES, BidirectionalMap< T, U >::insert(), EngineCore::L0_SHADER, EngineCore::L1_SHADER, EngineCore::L2_SHADER, EngineCore::MOVABLE_DIFFUSE_SHADER, EngineCore::NORMALS_SHADER, and EngineCore::STATIC_LIGHTMAP.
Referenced by getPipelineNameFromString(), and getPipelineNameFromString().
|
nodiscard |
Getter for the mesh shader path.
Definition at line 17 of file MaterialShader.cpp.
References meshShaderPath.
|
nodiscard |
Definition at line 36 of file MaterialShader.cpp.
References pipeline.
|
nodiscard |
Definition at line 50 of file MaterialShader.cpp.
References pipelineData.
|
static |
Converts the string name of a pipeline into the actual pipeline enum.
| pipelineName | the string to convert to a pipeline name |
Definition at line 62 of file MaterialShader.cpp.
References DEFAULT_MATERIAL_PIPELINE, and getMaterialNameMap().
|
static |
Gets the pipeline name as string.
| pipelineName | which pipeline to get the string for |
Definition at line 31 of file MaterialShader.cpp.
References getMaterialNameMap().
Referenced by EngineCore::AssetManager::initMaterialStorageBuffer(), and EngineCore::GltfLoader::VulkanSchneeMaterialExtension::VulkanSchneeMaterialExtension().
| void EngineCore::MaterialShader::setPipeline | ( | GraphicsPipeline * | pipeline | ) |
Sets the pipeline which corresponds to.
| pipeline | What pipeline this material corresponds to |
Definition at line 41 of file MaterialShader.cpp.
References pipeline.
|
nodiscard |
Definition at line 55 of file MaterialShader.cpp.
References meshShaderPath.
|
private |
Definition at line 79 of file MaterialShader.h.
|
private |
Definition at line 78 of file MaterialShader.h.
|
private |
Definition at line 66 of file MaterialShader.h.
|
private |
Definition at line 69 of file MaterialShader.h.
Referenced by getFragShaderPath(), MaterialShader(), and MaterialShader().
|
private |
Definition at line 68 of file MaterialShader.h.
Referenced by getMeshShaderPath(), MaterialShader(), MaterialShader(), and toString().
|
private |
Definition at line 75 of file MaterialShader.h.
Referenced by getPipeline(), MaterialShader(), and setPipeline().
|
private |
Definition at line 71 of file MaterialShader.h.
Referenced by getPipelineData().