SetAOPower() lua binding

This commit is contained in:
Turánszki János
2022-06-22 11:31:32 +02:00
parent 11fdd5f1f3
commit 949520e4b8
3 changed files with 22 additions and 4 deletions
@@ -675,10 +675,10 @@ It inherits functions from RenderPath2D, so it can render a 2D overlay.
- [constructor]RenderPath3D()
- SetAO(int value) -- Sets up the ambient occlusion effect (possible values below)
- AO_DISABLED : int -- turn off AO computation (use in SetAO() function)
- AO_SSAO : int -- enable simple brute force screen space ambient occlusion (use in SetAO() function)
- AO_HBAO : int -- enable horizon based screen space ambient occlusion (use in SetAO() function)
- AO_MSAO : int -- enable multi scale screen space ambient occlusion (use in SetAO() function)
- SetHBAOEnabled(bool value)
- AO_SSAO : int -- enable simple brute force screen space ambient occlusion (use in SetAO() function)
- AO_HBAO : int -- enable horizon based screen space ambient occlusion (use in SetAO() function)
- AO_MSAO : int -- enable multi scale screen space ambient occlusion (use in SetAO() function)
- SetAOPower(float value) -- applies AO power value if any AO is enabled
- SetSSREnabled(bool value)
- SetRaytracedReflectionsEnabled(bool value)
- SetShadowsEnabled(bool value)
+17
View File
@@ -26,6 +26,7 @@ namespace wi::lua
lunamethod(RenderPath_BindLua, SetLayerMask),
lunamethod(RenderPath3D_BindLua, SetAO),
lunamethod(RenderPath3D_BindLua, SetAOPower),
lunamethod(RenderPath3D_BindLua, SetSSREnabled),
lunamethod(RenderPath3D_BindLua, SetRaytracedReflectionsEnabled),
lunamethod(RenderPath3D_BindLua, SetShadowsEnabled),
@@ -71,6 +72,22 @@ namespace wi::lua
wi::lua::SError(L, "SetAO(AO value) not enough arguments!");
return 0;
}
int RenderPath3D_BindLua::SetAOPower(lua_State* L)
{
if (component == nullptr)
{
wi::lua::SError(L, "SetAOPower(float value) component is null!");
return 0;
}
if (wi::lua::SGetArgCount(L) > 0)
{
float value = wi::lua::SGetFloat(L, 1);
((RenderPath3D*)component)->setAOPower(value);
}
else
wi::lua::SError(L, "SetAOPower(float value) not enough arguments!");
return 0;
}
int RenderPath3D_BindLua::SetSSREnabled(lua_State* L)
{
if (component == nullptr)
+1
View File
@@ -27,6 +27,7 @@ namespace wi::lua
}
int SetAO(lua_State* L);
int SetAOPower(lua_State* L);
int SetSSREnabled(lua_State* L);
int SetRaytracedReflectionsEnabled(lua_State* L);
int SetShadowsEnabled(lua_State* L);