Added chromatic Aberration lua binds to RenderPath3D (#1141)
Co-authored-by: AnthonyPython <cto@gungnirstudiosllc.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user