Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
MaterialShader.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <filesystem>
7#include <string>
8
9namespace EngineCore
10{
11 enum PipelineNames : int;
12 class GraphicsPipeline;
13
18 {
19 public:
20 MaterialShader() = default;
22 const std::filesystem::path & meshShaderPath,
23 const std::filesystem::path & fragmentShaderPath
24 );
25
31
36 [[nodiscard]] std::filesystem::path getMeshShaderPath() const;
41 [[nodiscard]] std::filesystem::path getFragShaderPath() const;
42
43
44 [[nodiscard]] GraphicsPipeline * getPipeline() const;
45
46 [[nodiscard]] PipelineMaterialPayload getPipelineData() const;
47
48 [[nodiscard]] std::string toString() const;
49
55 static std::string getPipelineNameFromString( PipelineNames pipelineName );
61 static PipelineNames getPipelineNameFromString( const std::string & pipelineName );
62
63 private:
65
67
68 std::filesystem::path meshShaderPath = "";
69 std::filesystem::path fragmentShaderPath = "";
70
72
73 // VkDescriptorSet descriptorSet;
74 // and then use different pipelines for each pipeline layout here, as needed:
75 GraphicsPipeline * pipeline = nullptr; // vkPipeline; right now it points to just 2 or 3 pipelines,
76 // not really one per material.
77
78 std::string defaultMeshShader = "assets/Engine/shaders/Output/triangle.mesh.spv";
79 std::string defaultFragShader = "assets/Engine/shaders/Output/triangle.frag.spv";
80 };
81} // namespace EngineCore
Log category system implementation.
std::filesystem::path getMeshShaderPath() const
Getter for the mesh shader path.
static const BidirectionalMap< std::string, PipelineNames > & getMaterialNameMap()
PipelineMaterialPayload pipelineData
std::filesystem::path meshShaderPath
std::string toString() const
void setPipeline(GraphicsPipeline *pipeline)
Sets the pipeline which corresponds to.
std::filesystem::path fragmentShaderPath
GraphicsPipeline * getPipeline() const
PipelineMaterialPayload getPipelineData() const
DynamicMaterialUniformData dynamicUniformData
std::filesystem::path getFragShaderPath() const
Getter for the fragment shader path.
GraphicsPipeline * pipeline
static std::string getPipelineNameFromString(PipelineNames pipelineName)
Gets the pipeline name as string.