7#include <unordered_map>
30 enum class ShaderMacro : std::uint8_t {
31 FS_USE_DIFFUSE_TEXTURE,
32 FS_USE_MATERIAL_TRANSPARENCY,
33 VS_SHADOW_MAPPING_PASS,
48 std::vector<std::string> convertShaderMacrosToText(
const std::set<ShaderMacro>& macros);
57 std::string formatShaderMacros(
const std::vector<std::string>& macros);
103 const std::set<std::set<ShaderMacro>>& constantSets,
104 const std::set<std::set<ShaderMacro>>& macroSets,
105 const std::set<ShaderMacro>& appendToEachSet,
106 bool bIncludeEmptyConfiguration);
119 const std::set<std::set<ShaderMacro>>& toDuplicateSets,
120 const std::set<ShaderMacro>& toAppendToDuplicated);
135 static inline const std::unordered_map<ShaderMacro, ShaderMacro>
dependentMacros = {};
169 ShaderMacro macro,
const std::set<ShaderMacro>& configuration);
177 {}, {ShaderMacro::VS_SHADOW_MAPPING_PASS}};
186 {{ShaderMacro::FS_USE_DIFFUSE_TEXTURE},
187 {ShaderMacro::FS_USE_MATERIAL_TRANSPARENCY},
188 {ShaderMacro::FS_USE_DIFFUSE_TEXTURE, ShaderMacro::FS_USE_MATERIAL_TRANSPARENCY}},
Definition: ShaderMacro.h:60
static std::set< std::set< ShaderMacro > > combineConfigurations(const std::set< std::set< ShaderMacro > > &constantSets, const std::set< std::set< ShaderMacro > > ¯oSets, const std::set< ShaderMacro > &appendToEachSet, bool bIncludeEmptyConfiguration)
Definition: ShaderMacro.cpp:41
static std::set< std::set< ShaderMacro > > duplicateAndAppendConfiguration(const std::set< std::set< ShaderMacro > > &toDuplicateSets, const std::set< ShaderMacro > &toAppendToDuplicated)
Definition: ShaderMacro.cpp:71
static const std::set< std::set< ShaderMacro > > validComputeShaderMacroConfigurations
Definition: ShaderMacro.h:194
static const std::unordered_map< ShaderMacro, ShaderMacro > dependentMacros
Definition: ShaderMacro.h:135
static unsigned long long convertConfigurationToHash(const std::set< ShaderMacro > &configuration)
Definition: ShaderMacro.cpp:92
static bool isMacroShouldBeConsideredInConfiguration(ShaderMacro macro, const std::set< ShaderMacro > &configuration)
Definition: ShaderMacro.cpp:116
static const std::set< std::set< ShaderMacro > > validVertexShaderMacroConfigurations
Definition: ShaderMacro.h:176
static std::string convertConfigurationToText(const std::set< ShaderMacro > &configuration)
Definition: ShaderMacro.cpp:107
static const std::set< std::set< ShaderMacro > > validPixelShaderMacroConfigurations
Definition: ShaderMacro.h:184
Definition: ShaderMacro.h:198
size_t operator()(std::set< ShaderMacro > const &item) const
Definition: ShaderMacro.h:206