Added chromatic Aberration lua binds to RenderPath3D (#1141)

Co-authored-by: AnthonyPython <cto@gungnirstudiosllc.com>
This commit is contained in:
Anthony Python
2025-06-28 12:48:14 -04:00
committed by GitHub
parent 38cc0729f0
commit 0df54255a1
2 changed files with 37 additions and 0 deletions
+34
View File
@@ -72,6 +72,8 @@ namespace wi::lua
lunamethod(RenderPath3D_BindLua, GetLastPostProcessRT),
lunamethod(RenderPath3D_BindLua, SetDistortionOverlay),
lunamethod(RenderPath3D_BindLua, SetChromaticAberrationEnabled),
lunamethod(RenderPath3D_BindLua, SetChromaticAberrationAmount),
lunamethod(RenderPath2D_BindLua, CopyFrom),
{ NULL, NULL }
@@ -707,6 +709,38 @@ namespace wi::lua
return 0;
}
int RenderPath3D_BindLua::SetChromaticAberrationEnabled(lua_State* L)
{
if (component == nullptr)
{
wi::lua::SError(L, "SetChromaticAberrationEnabled(bool value) component is null!");
return 0;
}
if (wi::lua::SGetArgCount(L) > 0)
{
((RenderPath3D*)component)->setChromaticAberrationEnabled(wi::lua::SGetBool(L, 1));
}
else
wi::lua::SError(L, "SetChromaticAberrationEnabled(bool value) not enough arguments!");
return 0;
}
int RenderPath3D_BindLua::SetChromaticAberrationAmount(lua_State* L)
{
if (component == nullptr)
{
wi::lua::SError(L, "SetExposure(float value) component is null!");
return 0;
}
if (wi::lua::SGetArgCount(L) > 0)
{
((RenderPath3D*)component)->setChromaticAberrationAmount(wi::lua::SGetFloat(L, 1));
}
else
wi::lua::SError(L, "SetChromaticAberrationAmount(float value) not enough arguments!");
return 0;
}
static const std::string value_bindings = R"(
AO_DISABLED = 0
AO_SSAO = 1
+3
View File
@@ -79,6 +79,9 @@ namespace wi::lua
int SetDistortionOverlay(lua_State* L);
int SetChromaticAberrationEnabled(lua_State* L);
int SetChromaticAberrationAmount(lua_State* L);
static void Bind();
};