Graphics: rework ubershaders to prevent duplicate shaders modules

Also rename all remaining conditions to options
This commit is contained in:
Jérôme Leclercq
2021-07-08 14:52:39 +02:00
parent 9ab47edd11
commit a895e553d4
38 changed files with 524 additions and 485 deletions

View File

@@ -21,10 +21,10 @@ namespace Nz
struct MaterialPipelineInfo : RenderStates
{
struct ShaderStage
struct Shader
{
std::shared_ptr<UberShader> uberShader;
Nz::UInt64 enabledConditions = 0;
Nz::UInt64 enabledOptions = 0;
};
bool depthSorting = false;
@@ -32,7 +32,7 @@ namespace Nz
bool reflectionMapping = false;
bool shadowReceive = true;
std::array<ShaderStage, ShaderStageTypeCount> shaders;
std::vector<Shader> shaders;
std::shared_ptr<const MaterialSettings> settings;
};