60 lines
1.8 KiB
Plaintext
60 lines
1.8 KiB
Plaintext
|
-- @ Version: SCREEN SPACE SHADERS - UPDATE 21
|
||
|
-- @ Description: IL script
|
||
|
-- @ Author: https://www.moddb.com/members/ascii1457
|
||
|
-- @ Mod: https://www.moddb.com/mods/stalker-anomaly/addons/screen-space-shaders
|
||
|
|
||
|
-- Settings
|
||
|
local ssfx_il_quality = 0
|
||
|
local ssfx_il_res = 0
|
||
|
local ssfx_il_blur = 0
|
||
|
local ssfx_il_distance = 0
|
||
|
local ssfx_il_vibrance = 0
|
||
|
|
||
|
local ssfx_il_global_int = 0
|
||
|
local ssfx_il_hud_int = 0
|
||
|
local ssfx_il_flora_int = 0
|
||
|
|
||
|
-- Internal vars
|
||
|
module_installed = true
|
||
|
|
||
|
local function apply_il_settings()
|
||
|
|
||
|
-- Apply commands
|
||
|
get_console():execute("ssfx_il_quality " .. ssfx_il_quality)
|
||
|
get_console():execute("ssfx_il (" .. ssfx_il_res .. "," .. ssfx_il_global_int .. "," .. ssfx_il_vibrance .. "," .. ssfx_il_blur .. ")")
|
||
|
get_console():execute("ssfx_il_setup1 (" .. ssfx_il_distance .. "," .. ssfx_il_hud_int .. ", " .. ssfx_il_flora_int .. ",0)")
|
||
|
|
||
|
end
|
||
|
|
||
|
local function update_settings()
|
||
|
|
||
|
-- Get settings
|
||
|
module_id = "il"
|
||
|
|
||
|
ssfx_il_quality = ssfx_001_mcm.ssfx_get_setting(module_id, "quality", ssfx_ao_settings)
|
||
|
ssfx_il_res = ssfx_001_mcm.ssfx_get_setting(module_id, "res", ssfx_il_settings)
|
||
|
ssfx_il_blur = ssfx_001_mcm.ssfx_get_setting(module_id, "blur", ssfx_il_settings) * 5
|
||
|
|
||
|
ssfx_il_vibrance = ssfx_001_mcm.ssfx_get_setting(module_id, "vibrance", ssfx_il_settings)
|
||
|
|
||
|
ssfx_il_distance = ssfx_001_mcm.ssfx_get_setting(module_id, "distance", ssfx_il_settings)
|
||
|
|
||
|
ssfx_il_global_int = ssfx_001_mcm.ssfx_get_setting(module_id, "global_int", ssfx_il_settings)
|
||
|
ssfx_il_hud_int = ssfx_001_mcm.ssfx_get_setting(module_id, "hud_int", ssfx_il_settings)
|
||
|
ssfx_il_flora_int = ssfx_001_mcm.ssfx_get_setting(module_id, "flora_int", ssfx_il_settings)
|
||
|
|
||
|
ssfx_il_res = 1.0 / ssfx_il_res
|
||
|
|
||
|
-- Apply settings
|
||
|
apply_il_settings()
|
||
|
|
||
|
end
|
||
|
|
||
|
function on_game_start()
|
||
|
|
||
|
-- General Functions
|
||
|
RegisterScriptCallback("on_option_change", update_settings)
|
||
|
|
||
|
-- Read and apply settigns
|
||
|
update_settings()
|
||
|
end
|