Shader: Replace indices-based option keys by CRC32

This commit is contained in:
Jérôme Leclercq
2022-03-06 19:13:38 +01:00
parent 505d996c88
commit a7acf32886
18 changed files with 92 additions and 152 deletions

View File

@@ -22,12 +22,19 @@ namespace Nz
struct MaterialPipelineInfo : RenderStates
{
struct Option
{
UInt32 hash;
ShaderAst::ConstantValue value;
};
struct Shader
{
std::array<ShaderAst::ConstantValue, 32> optionValues;
std::shared_ptr<UberShader> uberShader;
};
std::array<Option, 32> optionValues;
std::size_t optionCount = 0;
std::vector<Shader> shaders;
std::shared_ptr<const MaterialSettings> settings;
};