From 6d399118bb291094bd0ed21211d10168e27aaacc Mon Sep 17 00:00:00 2001 From: Raikiri Date: Tue, 22 Oct 2024 01:12:59 +1300 Subject: [PATCH] Added multiplicative blend mode --- LegitScript/include/LegitScriptEvents.h | 3 ++- LegitScript/source/LegitScriptJsonApi.cpp | 1 + LegitScript/source/ScriptParser.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LegitScript/include/LegitScriptEvents.h b/LegitScript/include/LegitScriptEvents.h index 5e3a3e8..b48ac17 100644 --- a/LegitScript/include/LegitScriptEvents.h +++ b/LegitScript/include/LegitScriptEvents.h @@ -33,7 +33,8 @@ namespace ls { opaque, alphablend, - additive + additive, + multiplicative }; struct BlockBody diff --git a/LegitScript/source/LegitScriptJsonApi.cpp b/LegitScript/source/LegitScriptJsonApi.cpp index 8183c30..df0977c 100644 --- a/LegitScript/source/LegitScriptJsonApi.cpp +++ b/LegitScript/source/LegitScriptJsonApi.cpp @@ -25,6 +25,7 @@ namespace ls case ls::BlendModes::opaque: return "opaque"; break; case ls::BlendModes::alphablend: return "alphablend"; break; case ls::BlendModes::additive: return "additive"; break; + case ls::BlendModes::multiplicative: return "multiplicative"; break; } } json SerializeUniforms(const std::vector uniforms) diff --git a/LegitScript/source/ScriptParser.cpp b/LegitScript/source/ScriptParser.cpp index 20d7b2b..785b45f 100644 --- a/LegitScript/source/ScriptParser.cpp +++ b/LegitScript/source/ScriptParser.cpp @@ -22,7 +22,7 @@ namespace ls PreambleSection <- '[' (RendergraphSection / BlendModeSection / DeclarationSection / IncludeSection / NumthreadsSection) ']' RendergraphSection <- 'rendergraph' BlendModeSection <- 'blendmode' ':' BlendMode - BlendMode <- <'alphablend' | 'opaque' | 'additive'> + BlendMode <- <'alphablend' | 'opaque' | 'additive' | 'multiplicative'> DeclarationSection <- 'declaration' ':' String IncludeSection <- 'include' ':' StringArray NumthreadsSection <- 'numthreads' Int3