Lot of changes

This commit is contained in:
Dynamitos
2024-05-16 19:47:35 +02:00
parent 7690434f2b
commit 5fd41b8388
20 changed files with 182 additions and 35 deletions
+7
View File
@@ -62,6 +62,7 @@ struct ShaderPermutation
uint8 useMeshShading;
uint8 hasTaskShader;
uint8 useMaterial;
uint8 positionOnly;
//TODO: lightmapping etc
ShaderPermutation()
{
@@ -102,6 +103,10 @@ struct ShaderPermutation
useMaterial = 1;
strncpy(materialName, name.data(), sizeof(materialName));
}
void setPositionOnly()
{
positionOnly = true;
}
};
//Hashed ShaderPermutation for fast lookup
struct PermutationId
@@ -141,6 +146,7 @@ public:
void registerRenderPass(Gfx::PPipelineLayout baseLayout,
std::string name,
std::string mainFile,
bool positionOnly = true,
bool useMaterials = false,
bool hasFragmentShader = false,
std::string fragmentFile = "",
@@ -164,6 +170,7 @@ private:
bool useMeshShading;
bool hasTaskShader;
bool useMaterial;
bool positionOnly;
};
Map<std::string, PassConfig> passes;
Gfx::PGraphics graphics;