Add FLAXENGINE_VERSION_MAJOR/FLAXENGINE_VERSION_MINOR macros to shaders compilation
This commit is contained in:
@@ -253,6 +253,11 @@ bool ShaderCompiler::OnCompileBegin()
|
||||
_globalMacros.Add({ "REVERSE_Z", "1"});
|
||||
#endif
|
||||
|
||||
// Setup version macros
|
||||
_macroVersionMinor = StringAnsi::Format("{}", FLAXENGINE_VERSION_MINOR);
|
||||
_globalMacros.Add({ "FLAXENGINE_VERSION_MAJOR", Numbers[FLAXENGINE_VERSION_MAJOR] });
|
||||
_globalMacros.Add({ "FLAXENGINE_VERSION_MINOR", _macroVersionMinor.Get() });
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ private:
|
||||
ShaderProfile _profile;
|
||||
PlatformType _platform;
|
||||
Array<char> _funcNameDefineBuffer;
|
||||
StringAnsi _macroVersionMinor;
|
||||
|
||||
protected:
|
||||
ShaderCompilationContext* _context = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user